Suppress <return> for form submission?
Suppress <return> for form submission?
am 04.04.2008 17:50:05 von Thelma
I have a form for which I'd like all submissions to happen through the
submit buttons provided. But if the user enters a while 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 will not submit the form?
thanks, --thelma
Re: Suppress <return> for form submission?
am 04.04.2008 18:24:10 von Guillaume
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 while 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 will not submit the form?
Yep, but not through PHP. Refers to a javascript newsgroup please.
Regards,
--
Guillaume
Re: Suppress <return> for form submission?
am 04.04.2008 18:28:15 von Erwin Moller
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 while 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 will not submit the form?
>
> thanks, --thelma
>
>
Hi Thelma,
Yes, clear.
Go to your php.ini on the webserver, and find the following line:
browserHitReturnWillPostForm = 0
In case you cannot find that line, as I expect, repost your question to
a group that is relevant.
eg:
comp.infosystems.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.
Re: Suppress <return> for form submission?
am 04.04.2008 18:29:37 von Larry Anderson
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 while 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 will not submit the form?
>
> thanks, --thelma
a 10 second google search for suppress return submit revealed this
informative page:
http://www.arraystudio.com/as-workshop/disable-form-submit-o n-enter-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.
Re: Suppress <return> for form submission?
am 04.04.2008 19:00:14 von Thelma
larry@portcommodore.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 while 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 will 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-workshop/disable-form-submit-o n-enter-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.
Re: Suppress <return> for form submission?
am 04.04.2008 20:04:05 von Michael Fesser
..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 while 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 will 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
Re: Suppress <return> for form submission?
am 04.04.2008 20:40:16 von Courtney
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 while 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 will 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..?
Re: Suppress <return> for form submission?
am 04.04.2008 21:35:21 von zeldorblat
On Apr 4, 2:40 pm, The Natural Philosopher wrote:
> 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 while 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 will 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.
Re: Suppress <return> for form submission?
am 05.04.2008 01:59:20 von Courtney
ZeldorBlat wrote:
> On Apr 4, 2:40 pm, The Natural Philosopher wrote:
>> 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 while 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 will 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.
Your choice...
If it takes javashite to get the app to behave the way you want it,
that's what it takes.
Don't shoot the messenger...
Re: Suppress <return> for form submission?
am 05.04.2008 23:50:46 von Pat Willener
> I have a form for which I'd like all submissions to happen through the
> submit buttons provided. But if the user enters a while 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 will 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. Or as mentioned elsewhere,
disable Return
--
Regards,
Twayne
Open Office isn't just for wimps anymore;
OOo is a GREAT MS Office replacement
www.openoffice.org