[dev] Form.php and enum fields

Marko marko at oblo.com
Tue Jan 7 04:40:09 PST 2003


Quoting Chuck Hagenbuch <chuck at horde.org>:

> isset() should work, that's why it's not !empty(). So something else is
> going on. Try giving your element a label - "Choose one:" or something like
> that.

label, you mean text outside the select box or something like this (which also
doesn't work):
 $clientselect = _getEnumType(array('' => 'Choose one:') + $midas->getAllClients());
  $this->addVariable(_("Client"), 'client_id', $clientselect, true);

but it's the reason why the isset is being checked that i don't understand. if i
follow the logic right, the only situation where the !isset test will return
true and hence trigger the "field required" message would be if the $value
submitted is not in the <select> values list - trapping for a manually altered
GET submission?

what's more, monthyear and monthdayyear types don't do this check...

marko


More information about the dev mailing list