Suppress <return> for form submission?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thelma@uwm.edu

    Suppress <return> for form submission?

    I have a form for which I'd like all submissions to happen through the
    submit buttons provided. But if the user enters a <returnwhile in any
    text box, the form gets submitted, and it gets submitted as if the
    first submit button defined for the form had been pressed. Can I
    insure that pressing <returnwill not submit the form?

    thanks, --thelma


  • Guillaume

    #2
    Re: Suppress &lt;return&g t; for form submission?

    thelma@uwm.edu a écrit :
    I have a form for which I'd like all submissions to happen through the
    submit buttons provided. But if the user enters a <returnwhile in any
    text box, the form gets submitted, and it gets submitted as if the
    first submit button defined for the form had been pressed. Can I
    insure that pressing <returnwill not submit the form?
    Yep, but not through PHP. Refers to a javascript newsgroup please.

    Regards,
    --
    Guillaume

    Comment

    • Erwin Moller

      #3
      Re: Suppress &lt;return&g t; for form submission?

      thelma@uwm.edu schreef:
      I have a form for which I'd like all submissions to happen through the
      submit buttons provided. But if the user enters a <returnwhile in any
      text box, the form gets submitted, and it gets submitted as if the
      first submit button defined for the form had been pressed. Can I
      insure that pressing <returnwill not submit the form?
      >
      thanks, --thelma
      >
      >
      Hi Thelma,

      Yes, clear.
      Go to your php.ini on the webserver, and find the following line:

      browserHitRetur nWillPostForm = 0

      In case you cannot find that line, as I expect, repost your question to
      a group that is relevant.
      eg:
      comp.infosystem s.www.authoring.html

      PHP is a serverside language, not a webbrowser.

      Regards,
      Erwin Moller

      PS: I am a bit grumpy today since I had to throw away my 'OS' because it
      kept malfunctioning.

      Comment

      • larry@portcommodore.com

        #4
        Re: Suppress &lt;return&g t; for form submission?

        On Apr 4, 8:50 am, the...@uwm.edu wrote:
        I have a form for which I'd like all submissions to happen through the
        submit buttons provided. But if the user enters a <returnwhile in any
        text box, the form gets submitted, and it gets submitted as if the
        first submit button defined for the form had been pressed. Can I
        insure that pressing <returnwill not submit the form?
        >
        thanks, --thelma

        a 10 second google search for suppress return submit revealed this
        informative page:



        BUT!

        Since it is javascript some people may have it disabled.

        I allow for the enter to submit but on long forms I include an extra
        checkbox called 'finished' until that is checked PHP always exits back
        to the from, that way any mis-typed enters won't make the user submit
        incomplete data.

        Comment

        • thelma@uwm.edu

          #5
          Re: Suppress &lt;return&g t; for form submission?

          larry@portcommo dore.com wrote:
          : On Apr 4, 8:50 am, the...@uwm.edu wrote:
          : I have a form for which I'd like all submissions to happen through the
          : submit buttons provided. But if the user enters a <returnwhile in any
          : text box, the form gets submitted, and it gets submitted as if the
          : first submit button defined for the form had been pressed. Can I
          : insure that pressing <returnwill not submit the form?
          : >
          : thanks, --thelma


          : a 10 second google search for suppress return submit revealed this
          : informative page:

          Yes, my google search found the same kind of solutions. I was
          hoping for a php workaround like what you suggest below.

          thanks, --thelma

          : http://www.arraystudio.com/as-worksh...-keypress.html

          : BUT!

          : Since it is javascript some people may have it disabled.

          : I allow for the enter to submit but on long forms I include an extra
          : checkbox called 'finished' until that is checked PHP always exits back
          : to the from, that way any mis-typed enters won't make the user submit
          : incomplete data.

          Comment

          • Michael Fesser

            #6
            Re: Suppress &lt;return&g t; for form submission?

            ..oO(thelma@uwm .edu )
            >I have a form for which I'd like all submissions to happen through the
            >submit buttons provided. But if the user enters a <returnwhile in any
            >text box, the form gets submitted, and it gets submitted as if the
            >first submit button defined for the form had been pressed. Can I
            >insure that pressing <returnwill not submit the form?
            Not really.

            You have to validate your form data on the server anyway. If it's
            incomplete, show the form again. Additionally you can't rely on a
            particular submit button being triggered with [enter]. It's completely
            up to the browser what to do with forms that have multiple submit
            buttons.

            Micha

            Comment

            • The Natural Philosopher

              #7
              Re: Suppress &lt;return&g t; for form submission?

              Michael Fesser wrote:
              .oO(thelma@uwm. edu )
              >
              >I have a form for which I'd like all submissions to happen through the
              >submit buttons provided. But if the user enters a <returnwhile in any
              >text box, the form gets submitted, and it gets submitted as if the
              >first submit button defined for the form had been pressed. Can I
              >insure that pressing <returnwill not submit the form?
              >
              Not really.
              >
              You have to validate your form data on the server anyway. If it's
              incomplete, show the form again. Additionally you can't rely on a
              particular submit button being triggered with [enter]. It's completely
              up to the browser what to do with forms that have multiple submit
              buttons.
              >
              Micha
              What happens if there is no submit button? just a javascript driven
              clickable object to do the submit bit..?

              Comment

              • ZeldorBlat

                #8
                Re: Suppress &lt;return&g t; for form submission?

                On Apr 4, 2:40 pm, The Natural Philosopher <a...@b.cwrot e:
                Michael Fesser wrote:
                .oO(the...@uwm. edu )
                >
                I have a form for which I'd like all submissions to happen through the
                submit buttons provided. But if the user enters a <returnwhile in any
                text box, the form gets submitted, and it gets submitted as if the
                first submit button defined for the form had been pressed. Can I
                insure that pressing <returnwill not submit the form?
                >
                Not really.
                >
                You have to validate your form data on the server anyway. If it's
                incomplete, show the form again. Additionally you can't rely on a
                particular submit button being triggered with [enter]. It's completely
                up to the browser what to do with forms that have multiple submit
                buttons.
                >
                Micha
                >
                What happens if there is no submit button? just a javascript driven
                clickable object to do the submit bit..?
                Awesome -- now I need to have Javascript enabled just to submit a
                form. That's almost as bad as links that require it.

                Comment

                • Twayne

                  #9
                  Re: Suppress &lt;return&g t; for form submission?

                  I have a form for which I'd like all submissions to happen through the
                  submit buttons provided. But if the user enters a <returnwhile in
                  any text box, the form gets submitted, and it gets submitted as if the
                  first submit button defined for the form had been pressed. Can I
                  insure that pressing <returnwill not submit the form?
                  >
                  thanks, --thelma
                  Well, if you're doing field validation, users will learn rather quickly
                  after a few dings about missing data<g>. Or as mentioned elsewhere,
                  disable Return

                  --
                  Regards,

                  Twayne

                  Open Office isn't just for wimps anymore;
                  OOo is a GREAT MS Office replacement
                  The official home page of the Apache OpenOffice open source project, home of OpenOffice Writer, Calc, Impress, Draw and Base.




                  Comment

                  Working...