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.

Auto-submitting form data from a query string

  1. Form guru's:

    I'm working on a bookmarklet and would like to use the Gravity form as the receiver of the requests. Is it possible to have a form auto-post/submit just by loading that page?

    Example:
    Can I go to domain.com/pagewithform?var1=asdf&var2=hjkl&var3=etc

    ..and have the form submitted without the user hitting the submit button?

    Posted 14 years ago on Friday September 17, 2010 | Permalink
  2. Hi Orange,

    Could you walk me through this from the end user perspective? After clicking the bookmarklet, should the user see the form at all or only the confirmation?

    Posted 14 years ago on Friday September 17, 2010 | Permalink
  3. They won't actually see the page at all. They'll be clicking the bookmarklet from another page (any site on the Internet). From their POV a box pops up and let's them click a few options... The JS sends the whole string to the form.

    I'll just get an email with their results and later turn it in to a blog post.

    Need more?

    Posted 14 years ago on Friday September 17, 2010 | Permalink
  4. Hey Orange,

    So... I had never made a bookmarklet before so that was step one. It sounds like you've got the gist of the bookmarklet, so all you really need is this:

    $.post('http://gravityforms.ounceoftalent.com/boom/', { "input_1_3" : "David", "input_1_6" : "Smith", "input_2" : "spivurno@gmail.com", "input_3" : "Just a little content.", "is_submit_8" : "1"});

    You'll want to run this in your bookmarklet code wherever you are trying to submit the Gravity Form. This assumes that you are loading jQuery through your bookmarklet, otherwise you'll have to do the ajax the old fashioned way (gross!). You'll want to update http://gravityforms.ounceoftalent.com/boom/ to the URL of your form and each "input_1_?" based on the corresponding field id's in your form. The last value you'll want to update is "is_submit_8", replacing "8" with the ID of your form.

    Update: the forum parser strips out the bookmarklet link so... I just took that out.

    Posted 14 years ago on Friday September 17, 2010 | Permalink
  5. And then I realized that I lied. The above does not working on external URLs which kind of defeats the purpose. I'll revisit as time allows.

    Haha, sorry for the burst of false hope.

    Posted 14 years ago on Friday September 17, 2010 | Permalink
  6. Ha. If you email me I'll show you a working code example (minus the form submitting, of course).

    jmw@orangeapple.com

    Posted 14 years ago on Saturday September 18, 2010 | Permalink
  7. Did you get any where with this, it's interesting as it seems like the perfect solution the the problem I have with including my form in Facebook iFrame and posting the data string to InfusionSoft.

    So here's the set-up:

    (My word press site) > Gravity Form > Facebook iFrame > InfusionSoft

    Of course I expect the gravity forms data to populate my InfusionSoft database from my word press site AND the Facebook iFrame.

    Should I put this in a new post? Shall I add more details. Let me know guys if this has been done or discussed, I couldn't find it anywhere.

    The guys at infusion soft seem to think that as long as I inject the right $POST data into the Gravity Form it should work. I'm testing currently here:

    http://seattlemortgageadvice.com/infusion-gravity-form/

    Here's my Gravity Form:

    http://seattlemortgageadvice.com/purchase-builder/

    Many thanks for your help!

    Posted 13 years ago on Thursday May 5, 2011 | Permalink