PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

"Pass Field Data" as POST? (not GET)

  1. Hi, I'm using a gravity form to pass a name and an email address to an external php based mailing manager (yes I know, mailchimp would be preferable but the client has already forked out on this other thing).

    I'm using the 'Redirect' method in the form settings, and have 'Pass Field Data via Query String" ticked. This works fine.

    But... I'd prefer it if the 'ugly' qs wasn't used, and the data was passed in POST. Is this possible? I have already printed out $_POST on the receiving page just incase it was in there, but no.

    Aside: On that note... it would be FANTASTIC if this sport of redirection could be replaced with an AJAX call to another script so the user doesn't have to leave the WP site (even if it's so quick they don't know it).

    Posted 13 years ago on Friday February 25, 2011 | Permalink
  2. This isn't currently supported. The redirect is a redirect with the ability to pass information via the query string. It isn't technically a GET request because it doesn't submit to do this redirect, it uses PHP to redirect. So it's similar to a GET form action but really it's just a redirect.

    Currently this isn't possible with the redirect. However, it is possible using API hooks as part of the form submission process. You would have to write custom code to post data where you need to post it.

    You could use the gform_post_submission hook and write custom code to interact with another script or service. Here are some details:

    http://www.gravityhelp.com/forums/topic/sms-api-gateway-need-help-to-get-gform-to-integrate#post-18087

    Posted 13 years ago on Friday February 25, 2011 | Permalink
  3. Ah, well that's perfect. I can just do my DB submission directly in a function triggered by that hook then. Excellent! thanks.

    Posted 13 years ago on Friday February 25, 2011 | Permalink
  4. Exactly Ben, you can use that hook and do whatever you want with that data as part of the form submission process. Complete control.

    Posted 13 years ago on Friday February 25, 2011 | Permalink