Re: Modification to the html_options function: <select multiple> enabled
| From: | Andrei Zmievski | Date: | Wed, 06 Jun 2001 13:43:07 +0000 |
| Subject: | Re: Modification to the html_options function: <select multiple> enabled | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-872@lists.php.net to get a copy of this message | ||
On Wed, 06 Jun 2001, Bertrand DUNOGIER wrote:
> Hi,
>
> since I needed it, i've modified the html_functions from
> Smarty.Addons.php.
>
> One parameter was added:
> multiple
> type: boolean
>
> And the parameter selected now accepts a new type:
> when multiple == true, selected is an assoc. array like
> selected["value"] = true
> when selected["current option's value"] == true, that option is
> selected.
>
> That's all, here is the source code.
> Gimme your advice about it.
html_options already supports selecting multiple options -- you just
pass an array with the option values to be selected and use
selected=$array.
-Andrei
"Everything has its wonders, even darkness and silence, and I learn,
whatever state I may be in, therein to be content." - Helen Keller