Re: setDefaults for radio buttons

From: Date: Mon, 11 Oct 2004 20:38:05 +0000
Subject: Re: setDefaults for radio buttons
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14856@lists.php.net to get a copy of this message
Hi, Ellen Sundh wrote:
This is the code I am using to create the radio buttons.. $types[] =& HTML_QuickForm::createElement('radio',null,null,'None','None'); $types[] =& HTML_QuickForm::createElement('radio',null,null,'Live Session','Live Session'); $types[] =& HTML_QuickForm::createElement('radio',null,null,'Selected Remix','Selected Remix'); $form->addGroup($types,"type_0","Type: "," "); For setting the value I use something like this: $this->form->setDefaults(array("type_0"=>"My default value")) ; Am I heading in the right direction?
Your code should work if $form and $this->form are the same object.

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