PDA

View Full Version : Required Drop Down Menu?



Lights Up Theatre
05-24-2009, 07:29 PM
Does anyone know how to require a value for a drop down menu in MonsterMail? I'm using a pre-coded script coded with javascript that works quite nicely for the text fields but can't seem to get it to work for the drop down menus... here's the address of the form: http://www.lightsuptheatre.org/prereg09.shtml

What I currently am trying is adding the name of the select field (currently working on "Grade") in the array for field names and "Grade" in in the array for description/display name. I then added an option as follows:
<option selected value="">--Select Grade--</option>

However, when I submit the form, it doesn't require the drop-down. Any ideas?

Thanks,
Brendan

stamat
05-25-2009, 03:17 AM
Your <select> tag has value='' option. It should not nave it. Only <option> tags should have values. When you post form with <select> tag, you will receive selected options value in variable named as <select> tag (in PHP at least).

I am not sure this is cause of your problem, but it is place to start.

Your page has many errors on it (position of <head> tag, missing some parameters). You should use some tool for validating your pages. Simple way is to install HTML Validator (Tidy) addon for Firefox. It will display errors and warnings on all pages you view from Firefox. That way you can find and correct errors on them. When tags are misplaced or have errors in them, browsers try to correct them. This is good practice but it can produce unexpected results for site designer.

Regards