Re: QuickForm - how can I make checkboxes where the vlaue equals something like - NAME=PET_ARRAY[] value=dog> Dog
| From: | Alexey Borzov | Date: | Tue, 21 Dec 2004 22:02:50 +0000 |
| Subject: | Re: QuickForm - how can I make checkboxes where the vlaue equals something like - NAME=PET_ARRAY[] value=dog> Dog | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16389@lists.php.net to get a copy of this message | ||
Hi,
l Burnerheimerton wrote:
I'd like to create checkboxes that render like this: <INPUT TYPE=checkbox NAME=PET_ARRAY[] value=dog> Dog<br> <INPUT TYPE=checkbox NAME=PET_ARRAY[] value=cat> Cat<br> <INPUT TYPE=checkbox NAME=PET_ARRAY[] value=fish> Fish<br> The best I can come up with so far after MUCH working with it, is where the value = 1. I could no tget advcheckbox to work like this either. Any ideas? Thanks!I don't know the exact reason for this, but checkbox elements in QuickForm only allow '1' as the value since (probably) the very beginning of QuickForm. You should create your elements with names like PET_ARRAY[dog], etc. The basic example is available with the package and is called elements.php