Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // for demo form
- add_action('gform_after_submission_3', 'custom_function_name', 10, 2); //change number in gform line to match form number
- function custom_function_name($entry, $form) {
- $post_url = 'https://exampleform.com/id/456789'; //the public url for the form
- $body = array( //the first part is the field name of the input on the form
- //the second is the gravity forms field name
- 'field_51633323' => $entry['1.3'], //first name
- 'field_51633324' => $entry['1.6'], //last name
- 'field_51633325' => $entry['2'], //company
- 'field_51633326' => $entry['3'], //email
- 'field_51633327' => $entry['4'], //phone
- 'field_51633328' => $entry['5'] //comment box
- );
- $request = new WP_Http();
- $response = $request->post($post_url, array('body' => $body));
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment