Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.10

Request #1547 SetDefaults doesn't accept filters
Submitted: 2004-06-02 20:28 UTC
From: tdr32 at cs dot byu dot edu Assigned: avb
Status: Closed Package: HTML_QuickForm_Controller
PHP Version: 4.2.2 OS: RedHat 9
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 14 - 11 = ?

 
 [2004-06-02 20:28 UTC] tdr32 at cs dot byu dot edu
Description: ------------ Will trying to port my code from HTML_QuickForm to HTML_QuickForm_Controller, I noticed that my setDefaults filter was not being used. By inspection of the actual code for the Controller.php, the setDefaults doesn't accept a filter variable. I have fixed it in my own version by just adding in code from HTML_QuickForm to give HTML_QuickForm_Controller the ability. Reproduce code: --------------- // In Index.php $form->get_default_values(); // in form class function get_default_values() { $controller->setDefaults($this->default_values, array(&$this, 'filter_defaults')); } function filter_defaults($value) { // programming to filter the values sent return $value; } Expected result: ---------------- Well, it should just go use the filter_defaults() function. Actual result: -------------- It doesn't use the function

Comments

 [2004-06-09 13:46 UTC] avb
It wasn't advertised anywhere that setDefaults() in Controller will accept filters. Anyway, you are right and the stuff should work like setDefaults() in QuickForm.
 [2004-07-11 22:10 UTC] gurugeek
Dear Maintainer, Your package html_quickform_controller has currently 1 open bug. We urge you to take the necessary steps to solve the reported issues at your soonest convenience. If the bug issue hasn’t been addressed yet you are kindly asked to take the necessary steps to ensure a prompt resolution of the problem. If you already addressed the reported problem feel free to change the bug status as soon as possible. Regards David Costa PEAR Quality Assurance pear-qa@lists.php.net
 [2004-09-15 11:44 UTC] avb
Reclassify this as feature request.
 [2004-10-01 09:53 UTC] avb
Implemented in release 1.0.3