[Flow] identifier gets lost in form
Mark Kuiphuis
typo3 at markyourweb.com
Sat Jun 29 06:31:43 CEST 2013
On 29/06/13 12:12 AM, Winfried Mingst wrote:
> Hi Flowx,
>
> I try to edit properties of two models in one form desperately.
> There is a "master" and "detail" model/entity (1:1 unidirectional
> relation, "detail" holds foreign key @ORM OneToOne(
> cascade={"persist","remove"}))
>
> Source code of edit form shows identifiers of both models initialy:
>
> <input type="hidden" name="detail[__identity]" value="20390230..." />
> <input type="hidden" name="detail[master][__identity]"
> value="91a3aa0..." />
>
>
> BUT if the form is reloaded in case of a validation error, the 2nd
> hidden field gets lost!
> The result is a duplicate dataset in table master when the form is
> resubmitted.
>
> here is my Controller
> https://github.com/regioadmin/WL.Test/blob/master/Classes/WL/Test/Controller/DetailController.php
>
> here is my edit form
> https://github.com/regioadmin/WL.Test/blob/master/Resources/Private/Templates/Detail/Edit.html
>
>
>
> What's wrong? Do I need some additional subPropertyMapping config?
>
> thx
>
> Winfried
Hi Winfried,
Maybe this is of any help you. At least it helped me creating and
updating 2 and 3 objects in one Fluid form:
http://wiki.typo3.org/Flow_Cookbook#Create_multiple_objects_with_one_Fluid_form
More information about the Flow
mailing list