[horde] Re: Horde_Form_Type_enum

Jan Schneider jan at horde.org
Mon Feb 21 12:23:48 PST 2005


Zitat von Christopher Troup <mini at zaphod.homeunix.com>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
> I'm trying to add a select box with specified titles and values. However
> from what I can see from Horde/Forms.php there is no way of getting
> something like <option value="315">This is an option</option>. It seems
> to default to values counting 0,1,2,3,4...
>
> Obviously I must be wrong, and there must be a way to specify values.
> Here is code that I'm using.
>
> //$com is an array of option titles
> $form->addVariable('Edit Which Comment','com','enum',false,false,'',$com);
>
> it seems like I should be able to do something like
> $com[0][$i] = 'This is an option';
> $com[1][$i] = 315;

Try this instead:
$com[315] = 'This is an option';

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/


More information about the horde mailing list