drupal_execute function to submit form

0
Your rating: None

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().

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.

Cumulus Tag Cloud

Kiran Says

SEO Architect,SEO Specialist reflect my values.

By enduring black hat methods the SEO industry is setting itself up for washout and sleepwalking into oblivion.

Jobs in India