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

Request #6421 Allow control of all elements' persist freeze through freeze()
Submitted: 2006-01-05 23:22 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    
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 : 9 + 13 = ?

 
 [2006-01-05 23: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).

Comments

 [2006-01-05 23: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 13:52 UTC] avb (Alexey Borzov)
Moving feature requests to HTML_QuickForm2.
 [2006-10-12 21: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. :)