Re: HTML_QuickForm - Problem with setValue

From: Date: Tue, 08 Jun 2004 14:10:25 +0000
Subject: Re: HTML_QuickForm - Problem with setValue
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13009@lists.php.net to get a copy of this message
Ian P. Christian wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >On Tuesday 08 June 2004 14:44, Marcus Krause wrote: >>       $tmp_checkbox = >> HTML_QuickForm::createElement('checkbox',null,null,$email_row->lname.', >> '.$email_row->fname); >>       $tmp_checkbox->setValue($email_row->id); > >you can't do that. Checkboxs support a 1, or a 0. > >Set the name of the checkbox to id[], and then you will be able to parse the >add 'id' on submit. If you give a name to your checkbox, the generated array will look like id[3], id[5], id[10] etc. After the submit, just loop through the id array, get the keys and you are done. Bertrand Mansion Mamasam

« previous php.pear.general (#13009) next »