Re: fieldsToRender add/override options to create method in FormBuilder

From: Date: Thu, 09 Jun 2005 14:54:36 +0000
Subject: Re: fieldsToRender add/override options to create method in FormBuilder
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19575@lists.php.net to get a copy of this message
On 6/9/05, Dan Rossi <pear@electroteque.org> wrote: > hi there I tried to submit functionality for the formbuilder variables > in the dataobjects to be set before the options sent to the create > method. This gives the flexbility of overriding/merging the variables > in the dataobject on a per page basis. For instance I have a label > setup in the dataobject however of a different page I would like the > label to be named different. I have had the same issue for > fieldsToRender where it looks like i have to send the fieldsToRender > option for each page rather than setting is as global then the ability > to override this. Let me know what you think. > It sounds like you'resaying you submitted a feature request about this but I don't see anything new about this. As I've said before, this is one of the problems with FormBuilder being configured in so many ways. One overrides others and it's hard sometimes to override things. Personally I *never* use the options array in the create method or set options on the FB object directly. If I need to override settings in the DO I set then in the DO instance. $do =& DB_DataObject::factory('table'); $do->fb_fieldsToRender = array('field1', 'field2'); $do->fb_fieldLabels['field1'] = 'Special label for field1'; $fb =& DB_DataObject_FormBuilder::create($do); -- Justin Patrin

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