Re: QF checkbox set value (easy, I hope!)
| From: | Bertrand Mansion | Date: | Mon, 07 Jun 2004 18:50:58 +0000 |
| Subject: | Re: QF checkbox set value (easy, I hope!) | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12976@lists.php.net to get a copy of this message | ||
Tom Melendez wrote:
>Hey everyone,
>
>I hope this is an easy one for you folks:
>
>How can I change the value of a checkbox? I use this code:
>
>$form->addElement('checkbox', 'mycheck2','My
>check','chcklabel',array('value'=>'xxxxx'));
>
>and in the tag, the value still comes out as 1. Now, I understand that
>a checkbox is a True/False type thing (if its set, then it is true), but
>I'd rather have it give me back a 'Y' instead of a 1. Is this possible?
You can have a look at the advcheckbox element.
Although I never had the need to use it myself, I think it does what you want.
Bertrand Mansion
Mamasam