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  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rbradford at khov dot com
New email:
PHP Version: Package Version: OS:

 

 [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