Re: AW: [PEAR] [QuickForm] Change look of freezed objects

From: Date: Fri, 10 Dec 2004 19:16:26 +0000
Subject: Re: AW: [PEAR] [QuickForm] Change look of freezed objects
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16169@lists.php.net to get a copy of this message
Mirco Blitz wrote:
Hello Justin, thank you for your answer. When I use the array('disabled' => 'disabled') directly in side the checkbox declaration like in the following, it works fine. $form->addElement('checkbox','r_ben_anl','Benutzer anlegen','',array('disabled' => 'disabled')); But I also tried to set the attribute later, to have a nicer code and no if clauses between the elemt declaration. The nothing is displayed at all. This is my function for setting the attribute later. I think that one is wrong. function disable($name) { global $form; $el =& $form->getElement($name); $el->setAttributes(array('disabled' => 'disabled'));
Well, after this the following will be displayed as your element: <input disabled="disabled" /> That's probably not what you *really* want.
} Thank you very much for your help. Mirco Blitz


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