| HTML/XHTML Design Discuss anything to do with HTML XHTML design here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
I am trying to create a form for people on my website to fill out if they would like to create an online account, the web portal we use doesnt have the option to set up your own account so they must submit the info to us.I have the the fields for name address phone and stuff but it they click submit it will go through, i need it if they do not fill out field to stop them and make them fill it out before it sends.Any help?
|
|
|||
Change the onsubmit action for the form to a javascript check. You can check any field you like with something like: if(document.getElementById('ID_of_the_field').valu e == "") return false;Your onsubmit should look like The javascript should look like: form myFormChecker() { ....check each field as the above example shows... return true; }Because it returns false if a field is blank, the submission will not go through. If none of the checks return false, a true is returned and the submission will go through.This will all fail to function if scripts are blocked. So, you SHOULD also check on your server to ensure the fields are not blank and return the user to the form to finish filling it out.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT. The time now is 04:46 PM.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
Ad Management by RedTyger





Linear Mode
