Features added to QuickForm

From: Date: Wed, 21 Nov 2001 12:12:24 +0000
Subject: Features added to QuickForm
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3016@lists.php.net to get a copy of this message
Hi there, (Please read the whole thing, if just a bit interested in QuickForm) I have started all over with the 'add features to QuickForm'-project. Now addHeader() and addElement() takes an extra argument: $labelAttributes which, in addElement()'s place, will be past to the respective element-class and later on get transformed into an attribute-string that is placed in the cell of the specific label. When adding this, I had to add an extra attribute for all constructors in every class-file in Elements and when doing that I discovered that there are two copies of the getType() method in element.php. The last I've removed. Further more I've added setHeaderAttributes() and setLabelAttributes() which sets default attributes for headers and element-label-cells. I've also added setJsWarnings(), which sets the global $_jsPrefix and $_jsPostfix, and setRequiredNote() which sets $_requiredNote variable. At last, I've (again) corrected the addRule-documentation-related isue. When using QuickForm I noticed something: the $attributes argument in the addOption() method in select.php is never used, and, as far as i can see, you can´t pass anything to it as a user. If ok with you guys, I will remove this unused attribute and instead make it possibly to set the option value as an array og attributes. (actually, I've already done that, but wants a 'go' to upload it) This will make it possibly to pass a multidimensional array to addElement() when first parameter is 'select': $form->addElement('select', 'name', array('Key' => array('value' => 'test', 'style' => 'someStyle'), 'Key2' => 'Value2'), 'Label'); The edited files is to be found at: http://delfs.dk/QuickForm/ Hoping this work lives up to the packages standard. I've now spend some time on this and I really hope for some feedback, good as bad. -- Mvh./Best Regards Jonas Delfs, http://delfs.dk

« previous php.pear.dev (#3016) next »