Can dript do this?
Hi!
E. g. i have following Form:
$myForm = array(
'field1' => array(
'#title' => t('Field 1'),
'#type' => 'textfield',
'#default_value' => '5'
),
'field2' => array(
'#title' => t('Field 2'),
'#type' => 'textfield',
'#default_value' => '7'
),
'field3' => array(
'#title' => t('Field 1'),
'#type' => 'textfield',
'#value' => // see below
)
)
The value of field3 has to be: value of field1 + value of field2.
Ist this possible?
Thanks a lot!Groups:
Login to post comments
Usually you place Dript
Usually you place Dript script in a node content, a block or a CCK field. So far Dript can read value from CCK field which is a part of a node. It is the content creator that insert Dript script into the content. It seems to me that you are building a form module. Are you expecting the user of the form to enter Dript script? If so, then you have to evaluate the script from within your form submission code by calling the Dript evaluator.