Re: Element Select and selected value : how to declare it ?
| From: | Justin Patrin | Date: | Tue, 26 Oct 2004 16:32:30 +0000 |
| Subject: | Re: Element Select and selected value : how to declare it ? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15124@lists.php.net to get a copy of this message | ||
On Tue, 26 Oct 2004 17:07:44 +0200, Mos <mos_fr@yahoo.fr> wrote:
> Hi everybody !
>
> I put the following code in an QuickForm HTML form:
>
> $form->addElement('select', 'online', 'Status : ',
>
> array("0"=>"Choose","1"=>"All","2"=>"Published","3"=>"Unpublished"),
> array
> ('onchange' => "javascript:this.form.submit();") );
>
> I would know how to set a selected value ?
>
$form->setDefaults(array('online' => '2'));
--
paperCrane --Justin Patrin--