Advertisement
chrishajer

Revised field IDs and 2 hidden fields too

Mar 29th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. // Gform after submission
  2. add_action('gform_after_submission', 'post_to_third_party', 10, 2);
  3. function post_to_third_party($entry, $form) {
  4.  
  5.     $post_url = 'http://www.clientservices.us/TowerMedia/Post.aspx';
  6.     $body = array(
  7.         'name' => $entry['1'],
  8.         'street_address' => $entry['4'],
  9.         'city' => $entry['5'],
  10.         'state' => $entry['6'],
  11.         'zip_code' => $entry['7'],
  12.         'phone' => $entry['3'],
  13.         'date' => $entry['8'],
  14.         'ip' => $entry['9']
  15.         );
  16.  
  17.     $response = $request->post($post_url, array('body' => $body));
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement