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

Request #6421 Allow control of all elements' persist freeze through freeze()
Submitted: 2006-01-05 18:22 UTC Modified: 2007-04-05 16:30 UTC
From: nigel at catalyst dot net dot nz Assigned: avb
Status: Closed Package: HTML_QuickForm2
PHP Version: 4.4.0 OS: Debian GNU/Linux
Roadmaps: 0.1.0    

 [2006-01-05 18:22 UTC] nigel at catalyst dot net dot nz
Description: ------------ I have made a couple of changes that allow you to use the second parameter of HTML_QuickForm::freeze() to set whether it is persistant or not. That way people can easily say for all elements: I do _not_ want persistant freeze for _all_ elements, rather than calling it on all elements. This is really useful with the smarty renderer, when you want to use one template/page for viewing and editing. Test script: --------------- $form =& new HTML_Quickform; $foo =& $form->addElement(...); $bar =& $form->addElement(...); // more elements... if (!$edit_mode) { // We are not editing this time. We want to freeze the // elements of the form and _not_ print out the hidden // elements that contain the values $form->freeze(null, false); } Expected result: ---------------- Only the values of all of the elements will be printed when they are rendered, _not_ the hidden elements (because we are using false for second parameter, true is the default).


 [2006-01-05 18:24 UTC] nigel at catalyst dot net dot nz
I will send the patch or paste it here if you want this feature.
 [2006-06-08 08:52 UTC] avb (Alexey Borzov)
Moving feature requests to HTML_QuickForm2.
 [2006-10-12 16:39 UTC] avb (Alexey Borzov)
This is essentially a duplicate of request #4137 HTML_QuickForm2_Container class (already in CVS) handles freezing / unfreezing / changing persistent freeze behaviour of its contained elements. As Form class will inherit from Container, we may consider the feature request implemented. :)