using the HTML_QuickForm::updateElementAttr()

From: Date: Wed, 23 Mar 2011 15:14:31 +0000
Subject: using the HTML_QuickForm::updateElementAttr()
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-31037@lists.php.net to get a copy of this message
Hello everyone, I am currently using the Html quickform and would like to modify a quickform element based on a given value ( i.e larger than 10) and then setting it bold if it meets the requirement, as follows: $select1 = $this->form->addElement('static','within_range','Within the window'); if ($value > 10){ $array1 = array("within_range"=>"<b></b>"); $this->form->updateElementAttr($select1, $array1); } And I get the following warnings: *Warning*: array_keys() expects parameter 1 to be array, object given in * /usr/share/php/HTML/QuickForm.php* on line *988* *Warning*: Invalid argument supplied for foreach() in * /usr/share/php/HTML/QuickForm.php* on line *988* * * *I was wondering if someone can help with this! Or give me a simple example as how to use it!* * * *Thank you kindly for your help in advance!* * * *best regards,* * * *daniel*

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