[dev] Horde_Form and array fields

Marko marko at oblo.com
Tue Jan 28 19:24:02 PST 2003


i have an array field set up using horde_form:
  $this->addVariable('select', 'params[]', _getEnumType($paramslist), true);

in the html it gets listed in the hidden _formvars as:
  "_formvars[params[]]"

but then i do 
  $vars = &Horde_Form::getDefaultVars();

and do a var_dump of $vars, i get (just a snippet, note it's now "params[" the
fieldname, and not params[])...

array(11) {
  ["_formvars"]=>
  array(9) {
    ["inhook_select"]=>
    string(1) "1"
    ["params["]=>
    string(1) "1"

and so when i do a getInfo() on the form the $info variable does not contain my
params[] var that was set in the form.

i still haven't figured out how hermes manages to get all it's variables fed
back, considering that in the timeEntryForm they are all [].

anyone have any ideas?

marko


More information about the dev mailing list