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

quicksketch’s picture

Status: Active » Closed (duplicate)
Muyiwa’s picture

Component: Documentation » User interface
Assigned: Unassigned » Muyiwa
Priority: Normal » Major
Status: Closed (duplicate) » Active

Hello 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.

quicksketch’s picture

Assigned: Muyiwa » Unassigned
Priority: Major » Normal
Status: Active » Closed (duplicate)

@Muyiwa: The Webform issue queue isn't the place for asking questions about custom coding.

Any issues regarding "how do I code ..." or "how do I theme ..." will not be answered. Please look elsewhere for coding resources.

Please refer to other resources such as IRC or Drupal StackExchange to ask your questions.