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.

Submit to multiple URLs from the same form?

  1. Hey there!

    I have a client that I'm using Gravity Forms to have people submit a request for more information. The native Gravity Forms functionality which is sending the email request to the client works like a charm. However, the client wants the form to automatically submit the requester's info to their Salesforce.com account, so the requester is automatically entered into the CRM. I have written a separate script for that which works fine on its own.

    Where I'm having trouble is having the Gravity Form submit to BOTH URLs (the native URL which sends the email and the external script which submits to Salesforce). Currently, I'm using jQuery and AJAX to submit to Salesforce, but it overrides the native "success message" from Gravity Forms.

    Any suggestions on how I can submit to two scripts at the same time?

    Thanks in advance,

    --eric

    Posted 13 years ago on Wednesday December 15, 2010 | Permalink
  2. Bump - any ideas anyone?

    Posted 13 years ago on Thursday December 16, 2010 | Permalink
  3. Gravity Forms by default does not submit multiple places. It submits to itself. This can be overridden and you can change the form action using code, however then the data wouldn't be validated or saved by Gravity Forms.

    In order to post the data elsewhere you would have to write custom PHP as part of the form submission process and then post all of the data behind the scenes to the third party. You would have to write all of the code yourself.

    You would do this using the gform_post_submission hook. This hook has access to the entry object. The entry object contains all of the values that were submitted and stored in the resulting entry.

    You can get documentation for the gform_post_submission hook via the PDF below:

    http://s3.amazonaws.com/gravityforms/documentation/gform_post_submission.pdf

    This is a preview of some of the developer documentation that were are wrapping up that will document all of the available hooks and filters.

    Posted 13 years ago on Thursday December 16, 2010 | Permalink
  4. Very exciting to see the documentation coming together -- thanks!

    Posted 13 years ago on Thursday December 16, 2010 | Permalink
  5. One question: Where do I add this code so I can hook in? In functions.php?

    Posted 13 years ago on Friday December 17, 2010 | Permalink
  6. Yes, you would put that in your theme's functions.php file.

    Posted 13 years ago on Friday December 17, 2010 | Permalink
  7. Never mind -- found elsewhere that it does indeed go in functions.php.

    Posted 13 years ago on Friday December 17, 2010 | Permalink