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.

Disable submit

  1. Hi
    I'm using GF to create a calculated form.
    How can I stop the form being sent when return is hit?
    The form works as I want, I've hidden the submit button but if someone hits return it sends the form.
    Is there a way I disable the form being sent?
    I've looked through the previous queries but it doesn't seemed to have an answer.

    Many thanks in advance

    Peter

    Posted 12 years ago on Wednesday October 17, 2012 | Permalink
  2. The form is here http://www.jensonecig.com

    Posted 12 years ago on Wednesday October 17, 2012 | Permalink
  3. Please see this article:
    http://www.bloggingdeveloper.com/post/Disable-Form-Submit-on-Enter-Key-Press.aspx

    This is not a setting in Gravity Forms so you will need to attach some JavaScript to your page to change the default browser behavior.

    Posted 12 years ago on Wednesday October 17, 2012 | Permalink
  4. Hi

    Can anyone let me know how to put the below code into a form?
    <input type=”input_6_5” name=”input_6_5” onKeyPress=”return disableEnterKey(event)”>

    Many thanks

    Pete

    Posted 12 years ago on Thursday November 1, 2012 | Permalink
  5. It looks like you're trying to add a new input to the form? I don't think that was the intention of the code. I thought the code in the article I linked suggested adding the code to the body tag, with a small JavaScript function. That would prevent enter from submitting the form altogether.

    Posted 12 years ago on Friday November 2, 2012 | Permalink
  6. Hi Chris

    When I add the code it creates a new form field.
    I want to make an existing form field disable.
    Is that possible?

    Cheers

    Pete

    Posted 12 years ago on Friday November 2, 2012 | Permalink