[dev] Form.php and enum fields

Marko marko at oblo.com
Tue Jan 7 02:43:54 PST 2003


does anyone know why in line 794 of horde/lib/Form.php does it test for
!isset($this->values[$value]) ?

i'm trying to simply pass one value which would be '', so that the user will
have to explicitly pick a choice rather than inadvertantly hit submit with the
first choice displayed.

i have the following two lines in the form setup:
  $clientselect = _getEnumType(array('' => '') + $midas->getAllClients());
  $this->addVariable(_("Client"), 'client_id', $clientselect, true);

but !isset($this->values[$value]) always gives a false hence it never returns a
"this field is required" message. is this test used for any particular situation?

thanks,

marko


More information about the dev mailing list