The very first field on the contact form I have is a multiple recipient field.
It sends to a different email depending on what state is selected.
The first option on the field is "Please select state…"
Right now a user can submit the form with this and it validates.
How do I validate against an email address, or multiple email addresses to make sure that they choose a state? Or how do I make it so "Please select…" isn't the chosen option?
I was able to solve this using an external javascript validation method, it checks to see if the select option is the first available option, if it is, it doesn't validate.
It would be nice to do this using cforms though so if there is a solution I would like to know.
Javasctipt function used to check option selected
function TestDontSelect(objValue,dont_sel_index,strError)
{
var ret = true;
if(objValue.selectedIndex == null)
{
sfm_show_error_msg("ERROR: dontselect command for non-select Item");