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.

Creating an external url based on the information submited in a form.

  1. Hello.
    I would like to pass on some of the form data (that is submitted by the user) to an external application on an external url.
    I have read
    http://www.gravityhelp.com/forums/topic/passing-data-to-non-wordpress-application
    http://www.gravityhelp.com/forums/topic/pass-form-data-to-receipt-page
    But I think my request is something different.
    Could you please help me on this?

    Posted 13 years ago on Monday November 21, 2011 | Permalink
  2. It really depends on what you are trying to do.

    If you are trying to pass form data to an external application or an external URL when the form is submitted and do so behind the scenes, so the user doesn't see it happen and the user remains on your site... then you must do so by writing custom code and use the gform_after_submission hook.

    The gform_after_submission hook allows you to execute custom code and gives you access to the entry data that is created by the form. You can then execute custom PHP to do whatever you want with that data, send it to an external URL, etc. It's your custom PHP so you can do what you want.

    This hook is documented here:

    http://www.gravityhelp.com/documentation/page/Gform_after_submission

    Your custom code would go either in your themes functions.php file, or you would create your own custom plugin and activate it if you want your custom code to be self contained and not part of your theme files.

    If you want to physically redirect the user to this 3rd party site and pass data to it, then you can use the Redirect option for the Confirmation settings in the Form Settings. You can then use the query string builder to pass field data to that URL.

    So it really depends on what you are trying to do. It sounds like you want to do it behind the scenes, so custom code and the gform_after_submission hook is probably what you are going to need to utilize.

    Posted 13 years ago on Monday November 21, 2011 | Permalink
  3. Yes, I want to do it behind the scenes.
    Thank you Carl. You were very helpfull.

    Posted 13 years ago on Monday November 21, 2011 | Permalink
  4. No problem, so as mentioned above you would use the gform_after_submission hook and use that to execute your custom code after the form is submitted. That hook gives you access to the Entry object which contains all of the entry data. The entry is what is created when the form is submitted and stored. Have fun! Customizing Gravity Forms opens up a whole new world if you know how to work with WordPress and PHP.

    Posted 13 years ago on Monday November 21, 2011 | Permalink

This topic has been resolved and has been closed to new replies.