Re: Suppressing carriage return in a form action??
by Berk/Devlin <armadill(at)earthlink.net>
|
Date: |
Tue, 03 Jul 2001 18:42:02 -0700 |
To: |
hwg-techniques(at)mail.hwg.org |
|
todo: View
Thread,
Original
|
|
On Wed, 13 Jun 2001 10:05:28 -0700, I asked:
>I have a form (http://armadillosoft.com/epgy/join.php3) and my users are accidentally submitting it prematurely by pressing <ENTER> to go to the next field when they should be pressing tab.
>
>Is there some way in HTML that I can convert the <ENTER> key to a tab or at least suppress it unless the user is pointing to my SUBMIT button?
The helpful suggestions I received from hwg-techniques mostly involved using JavaScript and I wanted the fix I implemented to work regardless of whether JavaScript was turned on. (And, also, I don't actually want to validate every field, because they are free to not fill out every field.)
So, I decided to make this work as follows:
1. First form comes up. (Form warns users to not press Enter unless they really want to submit...) User can enter stuff and then user submits it.
2. Confirmation form comes up. (Form warns users to not press Enter unless they really want to submit.) User can enter/change any field. User submits it.
3. Email is forwarded to me.
Obviously, it's not perfect. But it's server-side, gives warning about Enter vs. Tab, and users get an extra chance to add/edit fields before form goes in. Anyway, worst that happens is incomplete form is submitted. No one dies if the form gets submitted prematurely, but now, hopefully fewer will be submitted prematurely.
So, now I've got a slew of different forms, all of which (hopefully) work similarly. They are at:
http://armadillosoft.com/epgy/epgyforms.php?theform=j.php
http://armadillosoft.com/epgy/epgyforms.php
http://armadillosoft.com/epgy/epgyforms.php?theform=gt.php
All comments are welcome. And thanks again for your suggestions.
--Emily
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Emily Berk ~
On the web at www.armadillosoft.com *** Armadillo Associates, Inc. ~
~ Project management, developer relations and ~
extremely-technical technical documentation that developers find useful.~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA