disable enter button to submit form

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default disable enter button to submit form

    I'm very new to ColdFusion - I'm building forms in Deamweaver, then using Cld
    fusion to pass he data to an Access Database. So far, so good. But I'd like
    to disable the enter button, so that the form is only submitted when the
    end-user hits the "submit" button so I don't have a bunch of semi-completed
    forms in my database. Suggestions?

    snark66 Guest

  2. Similar Questions and Discussions

    1. Enter key causes submit action in form
      I've created a form using Dreamweaver 4.0 and I see that pressing the Enter key in any blank field in the form causes a "Submit" action. When there...
    2. cf flash form submit on enter key down?
      Hey all, How can i make a flash form submit upon the user hitting the ENTER key? I would mostly like it to just be when either the last field is...
    3. enable/disable submit button
      :confused; can anyone help? i want to setup a form that allows users to upload files. i'm using ASPupload and this works great! however if a...
    4. Textbox and button -- enter key/submit - REFERENCE
      Hi, as you can see from my many posts the past few days, I have certainly been confused about the firing/non-firing of my textboxes and buttons. In...
    5. Q: Textbox press Enter submit form (ASCX version)
      Hello all, It's known to how to make user press enter in an asp:textbox and the form is submited by adding an attribute to the textbox with an...
  3. #2

    Default Re: disable enter button to submit form

    Make the inputs manadatory.
    Dan Bracuk Guest

  4. #3

    Default Re: disable enter button to submit form

    if you use a flash form you can bind the submit button's availability, but aside from that you should simply make everything "required" (as suggested) so the form won't submit unless completed.


    SafariTECH Guest

  5. #4

    Default Re: disable enter button to submit form

    Two things:

    Consider whether or not it actually a good idea to disable functionality in
    the browser. I have had several complaints from users that the "form is not
    working" as the enter key was disabled.

    Second, making all fields mandatory, as the op suggested, is not really the
    way way to go if you have fields that are not at all mandatory - possibly
    introducing a more annoying problem than the one you are trying to solve!
    (though making them all madatory may well be an option given the nature of your
    form?)

    Here's an alternative way to do this:

    <script>
    function stopEnter() {
    return !(window.event && window.event.keyCode == 13); }
    </script>

    Now, you need to do this (below) to all your fields:

    onkeypress="return stopEnter()"


    There would be quite afew other ways to do this too.




    Andley Jandley Guest

  6. #5

    Default Re: disable enter button to submit form

    if you make the form a cfform and use flash as it's format, users can only submit the form via the submit button (either clicking it or tabbing to it and pressing the spacebar).

    PaulH Guest

  7. #6

    Default Re: disable enter button to submit form

    Hi

    change the submit button to button, when the user clicks on the button, then using the
    javascript code you can submit the form like form.submit();
    vkunirs Guest

  8. #7

    Default Re: disable enter button to submit form

    So I just create a regular button in Flash, rather than a form button? I have NO experience in javascript - where might I find the code I need to embed in the button (and where does it go?)

    snark66 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139