I am trying to add the gform after submission code to the functions.php. I am not a coder, but it seems pretty straightforward and I have set up other forms to pass data to this same third party form. I have looked through the forum and google, but did not see a post that would take care of my issue.
This is the code I inserted:
add_action('gform_after_submission_1', 'post_to_third_party', 10, 2);
function post_to_third_party($entry, $form) {
$post_url = 'http://www.webaddress.com/formcentral.php';
$body = array(
"contact_name" => $entry["1"],
"email" => $entry["2"],
"cphone1" => $entry["7"],
"comment" => $entry["4"],
"site" => $entry["5"],
"id" => $entry["6"],
);
$request = new WP_Http();
$response = $request->post($post_url, array('body' => $body));
I added the _1 so only the data from form 1 will pass to the third party form. I have mapped all the data to the appropriate field, but still no go. Do you have any suggestions? If you need me to post a link or something, let me know where I can send it and you are free to look.