Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $('#formid').submit(function(){
  2. $(this).children('input[type=submit]').prop('disabled', true);
  3. });
  4.  
  5. /**
  6. * Implementation of hook_form_alter().
  7. */
  8. function mywebform_extra_form_alter(&$form, &$form_state, $form_id) {
  9. // Add extra submit for a particular Webform node:
  10. if ($form_id == 'webform_client_form_44') {
  11.  
  12.  
  13. // Add the submit handler after the existing Webform submit handler,
  14. // but before the second Webform handler. Pop off the first one and add
  15. // ours second.
  16. $form['#submit'][] = 'mywebform_extra_validate_44';
  17. }
  18. }
  19.  
  20. /**
  21. * Submit handler for Webform ID #44.
  22. */
  23. function mywebform_extra_submit_44(&$form, &$form_state) {
  24. global $user;
  25.  
  26.  
  27. // Now you can perform here api request and redirect
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement