DB_DataObject_FormBuilder questions
| From: | Peter Bowyer | Date: | Thu, 30 Dec 2004 08:53:05 +0000 |
| Subject: | DB_DataObject_FormBuilder questions | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16510@lists.php.net to get a copy of this message | ||
Hi,
I have a couple of questions about using DB_DataObject_FormBuilder:
- How can I freeze one particular field? When editing existing Users (as opposed to adding new ones) the username field of my form needs to be uneditable.
- I have been using $formBuilder->fieldLabels = ... to set friendly labels for my form. That's great, but some fields have to be recreated in the DB_DO class-located function preGenerateForm(), to change the field type. And values in the fieldLabels array for these fields are overridden. Is there any way to prevent this happening, as the DB_DO classes are very much common/core parts of this application, hopefully installed in one central location for a group of clients. Therefore anything needing to be customised should be located outside them - plus this makes multilingual use much easier.
(As an aside, I'm guessing to keep this 'pure' I should subclass the DB_DO-generated class and put these FormBuilder methods in there, then modify the class on a per-installation basis. But I'd still like the labels set all from one place :-))
Thanks,
Peter
--
Maple Design - quality web design and programming
http://www.mapledesign.co.uk