I was wondering if someone can help me to understand how the gform_after_submission works.
I created a sample Gravity Form with the id gform_1
I added one Text Field <input name="input_1" id="input_1_1" type="text" value="" class="medium" tabindex="1">
To have that text fields info passed to a php scrict called dataprocess.php I added this to my functions.php file:
<?php
add_action('gform_after_submission_1', 'post_to_third_party', 10, 2);
function post_to_third_party($entry, $form) {
$post_url = 'dataprocess.php';
$body = array(
'bname' => $entry['input_1_1'],
);
$request = new WP_Http();
$response = $request->post($post_url, array('body' => $body));
}
?>
In my dataprocess.php I added:
<?php
$bname = $_POST['bname'];
echo "Hello " . $bname . "";
?>
Should the form automatically redirect me to the dataprocess.php or do I need to setup the redirect and are the variables correct the way I am using them. I don't seem to get the php file to echo anything back to me.
Thanks for any help