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.
Comments
Comment #1
quicksketch#1211320: Ajax Submit
Comment #2
Muyiwa commentedHello Drupal fans,
I am having a problem implementing XHR calls in my module
I have an sms API that uses a url with necessary parameters to send data to the sms gateway
http://sms.breezweb.com/sendsms/sendsms.php?username=bale&password=lntp1... Inc.&mobile=7595965746455&message=testing testing testing...', 'post')
this url has to be passed via http without refreshing or redirecting...
Thank you for your suggestions in advance.
Comment #3
quicksketch@Muyiwa: The Webform issue queue isn't the place for asking questions about custom coding.
Please refer to other resources such as IRC or Drupal StackExchange to ask your questions.