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.

Advanced Form Settings: Custom Action URL

  1. Maybe I spaced recently, but I had thought I'd seen an option in the Form Settings under the Advanced tab to customize the "action" URL the form submits to. I was looking at the latest version and I didn't see that so I thought maybe it was another of my development dreams ;)

    I understand I can setup a filter to switch out the action using the 'gform_form_tag' filter, but is it planned to have something like this within the Form Settings itself under the Advanced tab?

    Posted 14 years ago on Sunday July 25, 2010 | Permalink
  2. Currently it isn't a feature in the form builder, it is only available via a filter. It is something we plan on adding a a feature either directly in the form builder or via an add-on. We have plans for an add-on that will allow you to post data to a 3rd party URL and map which fields are posted, etc.

    Why an add-on? Because like our MailChimp/Campaign Monitor/FreshBooks add-ons it will give you more flexibility and allow you to post data to multiple 3rd party URL's from one form submission, etc. So it will be more powerful that way.

    Posted 14 years ago on Monday July 26, 2010 | Permalink
  3. Works for me :-)

    Posted 14 years ago on Monday July 26, 2010 | Permalink
  4. How would I do this via a filter? I am looking to integrate foxycart...

    Posted 14 years ago on Friday July 30, 2010 | Permalink
  5. This isn't recommended unless you really know what you are doing with PHP as you would have to do custom validation. But there is an API hook you can use to change the form action.

    Here is an example:

    add_filter("gform_form_tag", "form_tag", 10, 2);
    function form_tag($form_tag, $form){
    $form_tag = preg_replace("|action='(.*?)'|", "action='custom_handler.php'", $form_tag);
    return $form_tag;

    But again, I don't recommend it unless you really know what you are doing.

    Posted 14 years ago on Friday July 30, 2010 | Permalink
  6. AccessMarketing
    Member

    Any updates on this thread? This response was posted over a year ago:

    "It is something we plan on adding a a feature either directly in the form builder or via an add-on. We have plans for an add-on that will allow you to post data to a 3rd party URL and map which fields are posted, etc."

    Really looking to have a simple "External Post URL" field in the form builder allowing posting to ANY 3rd party system supporting posts from external forms.

    Posted 12 years ago on Monday March 26, 2012 | Permalink
  7. Also jumping on the external action URL thing. But filter works for me, too.

    Posted 12 years ago on Tuesday March 27, 2012 | Permalink
  8. i'd love to see how i could make this work with sirportly and there remote form submission ability

    Posted 12 years ago on Thursday March 29, 2012 | Permalink
  9. Hi there,

    I've been reading through this and the gform_form_tag docs (http://www.gravityhelp.com/documentation/page/Gform_form_tag) and I'm failing to understand one thing.. I want to only implement this on one of my 12 gravity forms on my site.

    I'm trying to do something extremely complex with one particular form and I've come to the decision that I really need to write a custom script to process the form but I don't want to manually create the form as I'll lose all the useful multi paging etc.

    How do I apply this filter to only affect the action of a form of a particular ID?

    Cheers,
    Alex

    Posted 12 years ago on Thursday July 26, 2012 | Permalink
  10. David Peralty

    You can do a test early on like this:

    if($form["id"] != 5)
           return $form;

    That way it will only process the rest of your code if the form ID is 5.

    Posted 12 years ago on Thursday July 26, 2012 | Permalink
  11. Sweet! Thanks David. I think that might help me comprehend the dev tags a lot better as well :)

    Posted 12 years ago on Thursday July 26, 2012 | Permalink
  12. Sorry to re-awaken this one but I've just encountered a problem with this approach..

    So I added a custom action to one specific form on the site and it worked great - sends the data along to a custom URL so I can do some very custom processing of that data.

    However a couple of things are broken as a result of this - gravity forms "page breaks" and validation of "required" or special fields.

    When I put in any "page breaks" and click the 'next' button it instantly takes me to the form's custom action URL.

    Any suggestions? The main reason I decided to stick with Gravity Forms on this particular form on the website was to get the paging functionality and validation and not have to worry about those items myself.

    Unfortunately I really need the custom action url because I need to check the submitted data against the database and if the user has previously submitted a form then I append details to their previous record, but if they haven't then I create a new record for them.

    Cheers!
    Alex

    Posted 12 years ago on Sunday August 19, 2012 | Permalink