| Justin Patrin 2006-04-10, 7:00 pm |
| On 4/10/06, michael geary <listmail@gearyweb.com> wrote:
> Hi Folks,
>
> this should be simple, but i cannot do it with QuickForm. I *simply*
> want to produce the following HTML:
>
> <select name=3D'element_name'>
> <option value=3D"">Select One</option>
> <option value=3D"">---------</option>
> <option value=3D"user1">George Washington</option>
> <option value=3D"user43">George Bush</option>
> .....
> </select>
>
> Notice that the first two options have a duplicate (empty) value. The
> only way i know of to create a select element with QuickForm is to
> pass an associative array to the addElement() call, but i cannot have
> duplicate keys in an assoc. array, so i cannot model this with one
> array.
>
> Smarty allows you to use two 1-dimensional arrays to achieve this
> result. What can i do for this in QuickForm?
>
Try using addOption instead (not sure if it will work).
--
Justin Patrin
|