Is it possible to integrate pyrix with gravity forms?
Is it possible to integrate pyrix with gravity forms?
I have not heard of anyone integrating Pyrix before. However, if you can send data to them via a web request (HTTP Post) you can use the gform_after_submission hook to send the data you collect in your form. http://www.gravityhelp.com/documentation/page/Gform_after_submission
Hey Chris,
Thanks for the reply. Is this what you mean?
Yes, exactly. I had no idea what Pyrix was, but it looks like they will let you POST. You can use the gform_after_submission hook for that.
Thanks so much, my client is set on continuing to use pyrix :)
Chris,
Where do I put this code when im finished with it? Im using Genesis.
<?php
add_action('gform_after_submission', 'post_to_third_party', 10, 2);
function post_to_third_party($entry, $form) {
$post_url = 'http://thirdparty.com';
$body = array(
'first_name' => $entry['1.3'],
'last_name' => $entry['1.6'],
'message' => $entry['3']
);
$request = new WP_Http();
$response = $request->post($post_url, array('body' => $body));
}
?>
PHP code will normally go in your theme's functions.php. I'm not sure if Genesis has a functions.php file at all, or if they use a differently named file. If they don't use functions.php, please content StudioPress for their recommendation (or check the support forums there.)
http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F#PHP