|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Required Form Fields
Hi!
How do I make a form field required (I am us DW MX). i.e. The user will not be able to submit form before certain fields are filled in/selected. Thanks in advance! Chelsea |
|
#2
|
|||
|
|||
|
The best way is to have a javascript function handle that and submit your form once its validated.
example: <form name="blahblah" action="javascript:checkform(this)"> ........ </form> your javascript function: function checkform(form) { if(form.textfield.value == <whatever you want to check>) alert("textfield not valid"); else if ( <check other fields here>) ....... else //if everything is good and how you wanted it form.submit(); } hope this helps! |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > Required Form Fields |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|