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.

AutoSubmit with Gravity Forms

  1. trishacornelius
    Member

    Hi,

    So far I have been very impressed with Gravity and I only started using it this week :).

    Is it possible to create a form with an automatic submit...in other words, a form where the user does not see the information (hidden fields with dynamic population) and it is automatically submitted - the information is stored in the GF database in WordPress?

    The situation that I am trying to cater for is the following:
    1. Purchaser completes an order form on our site.
    2. The completed form gets sent to a third party payment processor using gform_post_submission.
    3. Then the payment processor sends back a confirmation form with the details of the successful payment. I would like to use GF to capture this information from the confirmation without a user having to do anything.
    4.The user gets directed to a confirmation page.

    I have no problems doing 1,2, and 4 with GF. Please can someone give me some help with 3.

    Posted 13 years ago on Saturday January 15, 2011 | Permalink
  2. Hi Trish,

    I'm actually not 100% sure on Step 3. I passed some of my thoughts along to our lead developer who will confirm and I will get back with you either late tonight or early tomorrow morning (he's in a different timezone).

    Thanks!

    Posted 13 years ago on Friday January 21, 2011 | Permalink
  3. trishacornelius
    Member

    Hi,

    I am just bumping this post...making sure it doesn't get lost in the timezone vortex :)

    Posted 13 years ago on Saturday January 22, 2011 | Permalink
  4. The only solution we could think of to automate this without getting into far more complex solutions, is to just add a bit of jQuery to trigger the form submission when the page is loaded. Something like this:

    <script type="text/javascript">
    
    jQuery(document).ready(function(){
    
        jQuery('form#gform_20').trigger('submit');
    
    });
    
    </script>
    Posted 13 years ago on Saturday January 22, 2011 | Permalink
  5. trishacornelius
    Member

    Thanks!

    I will give it a shot and let you know how it turns out.

    Posted 13 years ago on Saturday January 22, 2011 | Permalink
  6. That works really well. How would I add some code that stops the javascript if there is an error in the form submission. Currently, it just keeps trying to submit.
    Thanks
    Alexander

    Posted 11 years ago on Wednesday June 5, 2013 | Permalink