Advertisement
chrishajer

edited for no priority and action

Sep 24th, 2011
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. // http://www.gravityhelp.com/forums/topic/display-result-variable-in-confirmation-message
  2. // consider running only on a specific form by changing the "7" is your form ID
  3. add_action("gform_pre_submission_7", "send_post");
  4.  
  5. // there is no entry in the pre_submission hook
  6. function send_post($form)  {
  7.  
  8.     // dump the $form object to get the proper names for your fields
  9.     // uncomment this line to dump the object to stdout, which should be the web page
  10.     // echo "\n<!-- " . print_r($form,TRUE) . " -->\n";
  11.     $user_fname    = rgpost('input_1_3');
  12.     $user_password = rgpost('input_2');
  13.  
  14.     // create the SoapClient
  15.     $post_data = array('name' => $user_fname, 'pwd' => user_password);
  16.     $client    = new SoapClient("my.wsdl");
  17.     $the_file  = $client->getFileName($post_data);
  18.  
  19.     // consider some error handling here
  20.     // find the input ID for your hidden field and change 6 here to the proper field ID
  21.     $_POST["input_6"] = $the_file;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement