Form validation question

Results 1 to 2 of 2

Thread: Form validation question

  1. #1
    Join Date
    Dec 1969

    Default Form validation question

    Hi,<BR><BR>I&#039;m using this method as per 4guysfromrolla sample<BR><BR>for form validation...<BR><BR>How to include a dropdown box check for all the US States in here - need to write out each state with it&#039;s own check in the validation script???<BR><BR>Or as I suspect, there is an easier way....<BR><BR>Thanks,<BR>Scotty....

  2. #2
    Join Date
    Dec 1969

    Default RE: Form validation question

    If it is a select box there is pretty much only one invalid choice they can choose, thats if the selected nothing<BR><BR>have the value of the first selected option in the select box = "" <BR><BR>&#060;select name="states"&#062;<BR>&#060;option value=""&#062;Select a state&#060;/option&#062;<BR>...<BR>&#060;/select&#062;<BR><BR>then in your error checking check to see if the value of "states" = "" and if it is, it is an invalid state

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts