[dev] Form.php and enum fields
Chuck Hagenbuch
chuck at horde.org
Mon Jan 6 23:25:00 PST 2003
Quoting Marko <marko at oblo.com>:
> 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?
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.
-chuck
--
Charles Hagenbuch, <chuck at horde.org>
"Block Island Ferry - Fastest Route to Downtown"
More information about the dev
mailing list