Home » Database » DB_DataObject_FormBuilder » Bug #3199
Formbuilder affected by PHP Change / QuickForm issue
Details
| Submitted | 2005-01-14 09:14 UTC |
|---|---|
| From | ruempler at topconcepts dot de |
| Assigned | justinpatrin |
| Status | Closed |
| Package | DB_DataObject_FormBuilder |
| PHP Version | 5.0.3 |
| OS | irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-01-14 09:14 UTC] ruempler at topconcepts dot de
Description:
------------
Hi,
please read http://pear.php.net/bugs/bug.php?id=3189 first.
This bug is triggered if I add a group for a field in the callback postGenerateForm().
The field is not in $fb_fieldsToRender, but the field name exists in the table, so setDefaults() passes data to the group.
The reproduce code with a simple QF is in the bug report above.
Thank you.
[2005-01-14 18:05 UTC] ruempler at topconcepts dot de
Thx, Justin, the fix works for me.
I have file upload fields and they are getting a specific group with the file element, a link for preview (only if a file is already uploaded) and a checkbox for deleting the existing file. In the table I store the file extension (group element name and field name are the same), because i then can link to the image with table_name/field_name/$id.$ext in the file-system.
In postGenerateForm i add the group by my-self with insertElementBefore() and the $fb_fieldLabels.
The upload handling is done in preProcessForm and postProcessForm.
Hope that helped you to understand the problem. Maybe there is a better solution for that? But before PHP 5.0.3 it worked perfectly ;-)