Formbuilder $fb_linkNewValue: Bug or Feature?

From: Date: Tue, 22 Aug 2006 19:42:42 +0000
Subject: Formbuilder $fb_linkNewValue: Bug or Feature?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24958@lists.php.net to get a copy of this message
Hi, I posted yesterday with some problems that I was having with Formbuilder. Thanks for everyone's input on fixing that problem. Now I have a bit of curiosity regarding the behavior of $fb_linkNewValue: Is there a way to inherit the rules outlined in a classes postGenerateForm when --New Value-- is selected? As it is now I need to define for each calling form its relative form element name. For example, here is my postGenerateForm for a particular class: function postGenerateForm(&$form) { $form->addRule('urlstart', 'You must supply a starting URL.', 'required'); $form->addRule('merchantid_ga_merchants__urlstart', "You must supply a starting URL.", 'required'); $form->addRule('merchantid_ga_merchants____crossLink_ga_merchant_categories_merchantid_categoryid', "You must select at least one category.", 'required'); $form->addRule('__crossLink_ga_merchant_categories_merchantid_categoryid', 'You must select at least one category.', 'required'); $form->setDefaults(array('active' => 1)); } You'll notice that I have created two rules each for urlstart & categoryid that are the same; the only difference being if another form is calling it or it's being called natively. I might be missing a simple boolean flag somewhere. Any suggestions? -- View this message in context: http://www.nabble.com/Formbuilder-%24fb_linkNewValue%3A-Bug-or-Feature--tf2148327.html#a5932335 Sent from the Pear - General forum at Nabble.com.

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