Hi group,
What is the best way to use DFV (via CAP::ValidateRM) with drop-down
menus which have default as blank?
To elaborate with an example - field entry 'last_name' is required by
check_rm(), so an empty submission should trigger an error, and does.
But the problem is to satisfy HTML validation I have to use the
following html construct:
<select name="last_name">
<option> </option>
<option>name_1></option>
.......
</select>
The presence of the nbsp; - which equates to ' ' - means the field is
not empty, so triggers an 'invalid' flag rather than 'missing' flag.
Replacing <option> </option> with <option></option> triggers the
more accurate 'missing' flag, but is invalid html. I could complicate
the process by using something like
<option>-- please select one --</option>, but this complicates the
validation routine and I would rather use the blank entry method *and*
generate valid html. Is there any way I *can* have my cake and eat it on
this one?
--
Richard Jones
Leeds, UK
mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]