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

Request #7447 a hideElements method would be great
Submitted: 2006-04-20 22:40 UTC
From: rbradford at khov dot com Assigned:
Status: Open Package: DB_DataObject_FormBuilder (version 1.0.0RC4)
PHP Version: 5.1.1 OS:
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 : 41 - 1 = ?

 
 [2006-04-20 22:40 UTC] rbradford at khov dot com
Description: ------------ It would be really useful to have a method which would turn included elements into hidden elements. In some of my forms where I add records I include most of my fields from a data object, but some of these included fields I don't want displayed. I know you can use preGenerateForm() and fb_preDefElements[] to create hidden elements, but a simple method for this would help a lot. I'm not totally sure what the method would be (or even if it is a FormBuilder method), but this is what I was thinking: $something = DB_DataObject::factory('somethings'); $builder =& DB_DataObject_FormBuilder::create($something); $elementsToHide = array('user_id', 'created_at')); $builder->hideElements($elementsToHide); For example, if this was a form to add a new "something" then somewhere along the line you could assign values to the 'user_id' and 'created_at' elements but then hide them. Again, I'm not sure if this method would be in the FormBuilder or QuickForm classes. Just a thought.

Comments