Re: DB_DataObject_FormBuilder Questions

From: Date: Wed, 01 Dec 2004 16:45:02 +0000
Subject: Re: DB_DataObject_FormBuilder Questions
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15952@lists.php.net to get a copy of this message
Sönke Ruempler wrote:
Hi, and the third Mail this morning to the list ;-) While experimenting with DB_DataObject_Formbuilder, i noticed some things: - What about Database combined datetime fields (mysql), are they supported?
In principle, those are supported, you'd need to set the dateElementFormat to, for example "d.m.Y H:i:s" (German format) to allow entering the time values as well. Or, you could use another type of input (I, for example, use jsCalendar via the elementTypeMap) and define callback methods for converting the date format from the one needed by the database to the one needed by the form element you're using (see: http://opensource.21st.de/tiki-index.php?page=Formbuilder+configuration+options#id530244).
- Is it possible to trigger a build of a file-upload field? Or should this be done manually?
File upload fields have to be constructed maually, preferably in the fb_preGenerateForm() method. There are no plans for introducing automatic file upload element creation to FormBuilder at this time.
- I tried to change the field types: var $fb_elementTypeMap = array( 'title' => 'text', 'subTitle' => 'text', 'image' => 'text', 'datetime' => 'date', 'shorttext' => 'text', 'text' => 'text', 'price' => 'text', 'info' => 'text', 'pageImage' => 'text', ); Now all fields are text (also the datetime field, what was a QF date field without the typeMap) and a PHP warning occurs: [...]
Your elementTypeMap is wrong. It seems that for some entries you have assigned a QuickForm element type to a specific field name, which won't work. You can only assign QuickForm element types to FormBuilder's internal field types, which are: # shorttext # longtext # date # integer # float (see: http://opensource.21st.de/tiki-index.php?page=Formbuilder+configuration+options#id537309) I *think* the warnings you're getting are somehow related to that, but I can't be sure as I've never encountered this before. Regards, Markus

« previous php.pear.general (#15952) next »