# WordPress Gravity Forms HTTP Post

**URL:** <https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589>\
**Category:** API Q&A\
**Tags:** web-forms\
**Created:** [January 16, 2019, 9:08pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589 "2019-01-16T21:08:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Forthea\_Development](https://avatars.discourse-cdn.com/v4/letter/f/9e8a1a/32.png) [@Forthea\_Development](https://integration.keap.com/u/Forthea_Development)\
**Post date:** [January 16, 2019, 9:08pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/1 "2019-01-16T21:08:03Z")

</div>

Hi everyone,

I’m hoping I can find someone to guide on this bug I’m running into. The code below targets a specific where x is a form ID. I created a web form submission goal in the campaign, pulled the action URL from the form and required field names from it. Gravity Forms does post to the campaign and I saw my entry go through but that’s it. Now I’m not sure if it’s a Gravity Forms issue or Infusionsoft. I had a colleague test it out with their email and their information did not go through. I would appreciate any assistance.

```
    add_filter( 'gform_after_submission_x', 'set_post_content', 10, 3 ); //to be replaced with form ID
   function set_post_content( $entry, $form ) {
    $post_url = 'https://abc.infusionsoft.com/app/form/process/xyz'; //xyz is unique to the form created in infusionsoft
    $fields = array(
	    'inf_field_FirstName'=> rgar( $entry, 'a' ),//a can vary depending on the field ID for firstname
	    'inf_field_LastName'=> rgar( $entry, 'b' ),//b can vary depending on the field ID for lastname
	    'inf_field_Email'=> rgar( $entry, 'c' ),//c can vary depending on the field ID for email
	    'inf_form_xid' => 'xyz',//matches the unique ID in the $post_url string
	    'infusionsoft_version' => '1.70.0.77019',
	    'inf_form_name' => 'Web Form submitted'
	  );
  	GFCommon::log_debug( 'gform_confirmation: body => ' . print_r( $fields, true ) );
 	$request = new WP_Http();
   	$response = $request->post( $post_url, array( 'body' => $fields ) );
   	GFCommon::log_debug( 'gform_confirmation: response => ' . print_r( $response, true ) );
}

```

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [January 16, 2019, 9:23pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/2 "2019-01-16T21:23:13Z")

</div>

I tried this approach some time ago. GF seems to interfer somehow. My solution was to post parameters under confirmations to a php script I wrote to complete the connection to IS.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/e/e4cc34bc6f65330c5d1e12051fbff7e4bf2d01e2.png)

---

<div class="post-metadata">

**Author:** ![Adrian\_Tobey](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/adrian_tobey/32/4601_2.png) [@Adrian\_Tobey](https://integration.keap.com/u/Adrian_Tobey)\
**Post date:** [January 16, 2019, 9:25pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/3 "2019-01-16T21:25:38Z")

</div>

As far as I know you can no longer post to Infusionsoft forms at all. Regardless of whether you have the google recaptcha enabled or not, you get blocked by the recaptcha if its just a POST and not a “visitor”

---

<div class="post-metadata">

**Author:** ![Forthea\_Development](https://avatars.discourse-cdn.com/v4/letter/f/9e8a1a/32.png) [@Forthea\_Development](https://integration.keap.com/u/Forthea_Development)\
**Post date:** [January 16, 2019, 9:27pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/4 "2019-01-16T21:27:10Z")

</div>

Is it a cURL script by any chance?

---

<div class="post-metadata">

**Author:** ![Forthea\_Development](https://avatars.discourse-cdn.com/v4/letter/f/9e8a1a/32.png) [@Forthea\_Development](https://integration.keap.com/u/Forthea_Development)\
**Post date:** [January 16, 2019, 9:28pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/5 "2019-01-16T21:28:35Z")

</div>

Hmm well that’s a bummer. The plugin we relied on is unfortunately outdated: [Infusionsoft Gravity Forms Add-on – WordPress plugin | WordPress.org](https://wordpress.org/plugins/infusionsoft/)

So I’m hoping I can find a quick solution in the meantime

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [January 16, 2019, 9:28pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/6 "2019-01-16T21:28:42Z")

</div>

You would only be able to use cURL with REST and that would require a system to keep the access token refreshed. So likely not. I normally use PHP.

---

<div class="post-metadata">

**Author:** ![Adrian\_Tobey](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/adrian_tobey/32/4601_2.png) [@Adrian\_Tobey](https://integration.keap.com/u/Adrian_Tobey)\
**Post date:** [January 16, 2019, 9:31pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/7 "2019-01-16T21:31:41Z")

</div>

@Forthea_Development you can use this new GF plugin [Gravity Forms Infusionsoft Feed – WordPress plugin | WordPress.org](https://wordpress.org/plugins/systasis-gf-infusionsoft-feed/)

Or switch to something like FormLift. [https://formlift.net](https://formlift.net)

---

<div class="post-metadata">

**Author:** ![Collins\_Agbonghama](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/collins_agbonghama/32/12082_2.png) [@Collins\_Agbonghama](https://integration.keap.com/u/Collins_Agbonghama)\
**Post date:** [August 23, 2020, 1:01pm UTC](https://integration.keap.com/t/wordpress-gravity-forms-http-post/61589/8 "2020-08-23T13:01:41Z")

</div>

You can use MailOptin as a bridge to [connect Gravity Forms to Infusionsoft](https://mailoptin.io/connect/gravity-forms-to-infusionsoft/).

You can map custom fields and specify tags too.

Here is the documentation =\> [Connect Gravity Forms to Mailchimp, AWeber, Sendinblue, MailerLite Etc](https://mailoptin.io/article/gravity-forms-mailchimp-aweber-more/)

And it is free =\> [Popup, Optin Form & Email Newsletters for Mailchimp, HubSpot, AWeber – MailOptin – WordPress plugin | WordPress.org](https://wordpress.org/plugins/mailoptin/)
