Re: Quick_Form -- How to disable a select list in a group?

From: Date: Wed, 25 Jun 2003 18:22:07 +0000
Subject: Re: Quick_Form -- How to disable a select list in a group?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6232@lists.php.net to get a copy of this message
Bertrand - That did the trick. Thanks for the quick response. Cheers Graham At 04:59 PM 6/25/2003 +0200, Bertrand Mansion wrote:
<grahamc@53tech.com> wrote : I have a group of 3 select lists in a form -- each element is created like this.
       $selects['roles'] =& $roleForm->createElement('select', 'role_code');
       $selects['roles']->addOption('-- Select a Role', 0);
       $selects['roles']->loaddbResult($roles, 'role_name', 'role_code',
$role_code); I want to selective "disabled" to the element --> so source would look like this <select name="role_code" disabled> Tried this to no avail
       $roleForm->addGroup($selects, 'roles', '', '&nbsp;', false);
--->> $roleForm->updateElementAttr('parents', "disabled"); Did you try: $selects['roles']->updateAttributes(array('disabled'=>'disabled')); Bertrand Mansion Mamasam
Graham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955

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