I'm using Webforms 3.x and Drupal 7.x.

I'd like to be able to use Drupal 7's Ajax features to provide a confirmation message via Ajax on submit.

To achieve this, I'm hoping to modify my form using a HOOK_form_alter.

The $form array provides the submit element at $form['actions']['submit']. If I add an ['#ajax'] attribute here, the action takes effect when submit is actioned by the use, and the callback function specified is called.

It seems that webform initiates two callbacks from

$form['#submit'][0] = webform_client_form_pages

$form['#submit'][1] = webform_client_form_submit

My question is, how can I initiate the necessary webform callbacks on Ajax submit? I'm not totally familiar with webform, or how it deviates from standard FAPI (or if it does at all).

Any advice appreciated.

1 Answer 1


See this page on drupal.org for info

  • Please add answer instead of just giving links.
    – Dudepal
    Mar 4, 2014 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.