Quick_Form -- How to disable a select list in a group?
| From: | Graham Clarke | Date: | Wed, 25 Jun 2003 17:45:29 +0000 |
| Subject: | Quick_Form -- How to disable a select list in a group? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-6229@lists.php.net to get a copy of this message | ||
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', '', ' ', false);--->> $roleForm->updateElementAttr('parents', "disabled"); Graham Graham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955