Jump to content

Question about Combo box


nagalenoj

Recommended Posts

Dear friends,

    I have placed a combo box in my web page. If I didn't select any values in the combo box, the first value in the combo box is taken. But, I want the user must have to select one value, else I have to display an error.

    Now, I am managing this by having an empty value in  the beginning and check for the empty value after submission,

    Is, there any parameter or any other way to solve my problem?

 

 

Link to comment
https://forums.phpfreaks.com/topic/136012-question-about-combo-box/
Share on other sites

Use javascript, check to see if the selection == 0, if so display an alert or w/e you want to do.  You should have a function that returns either true or false depending on your error checking.  I just found this on google real quick, there is a client side check for non-selections.  You should also check server side in-case the user has JS disabled.  If you have specific trouble please post it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.