Re: FormBuilder nested forms trouble
| From: | Justin Patrin | Date: | Wed, 21 Nov 2007 04:07:04 +0000 |
| Subject: | Re: FormBuilder nested forms trouble | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28196@lists.php.net to get a copy of this message | ||
On Nov 20, 2007 4:02 PM, Mike <cs169-an@imail.eecs.berkeley.edu> wrote:
> Hi, I've created a nested form that has multiple rows from one table in
> it. For some reason, only the last form generated in the sequence of
> nested forms actually persists its data to the database. The fields post
> the data, but the update statement (from the generated SQL) only takes
> care of the last form.
>
> I've set the field prefixes so each field is unique in the form, and
> inspecting the final nested form shows the $_elements array with the
> appropriate prepended prefix. HTML looks right too.
>
> I followed the "nested forms" slide in this slide presentation:
>
> http://opensource.21st.de/static/formbuilder/rapidprototyping-kr.pdf
>
> Also, I'm using a WHERE clause on the DataObject before I iterate over it
> with fetch() to progressively nest the rows; maybe that's complicating
> things?
>
Make sure the prefixes are set right for each record when you process it.
--
Justin Patrin