Submitted by Kiran on Mon, 04/13/2009 - 13:08
In Drupal,forms that are displayed in a web browser can also be filled out programmatically.
Here is an example to fill out our firstname and lastname programmatically.
$form_id = 'formexample_nameform';
$field_values = array(
'user_firstname' => t('Kiran'),
'user_lastname' => t('Hota')
);
// Submit the form using these values.
drupal_execute($form_id, $field_values);
Just supply the form ID and the values for the form, and call
drupal_execute().
»
- Kiran's blog
- 1113 reads













Post new comment