[TYPO3-dev] Fluid Frontend Edit for 1:n relation
Stefan Padberg
post at bergische-webschmiede.de
Wed May 21 13:57:29 CEST 2014
Hi,
here's the solution:
<f:for each="{enterprise.contacts}" as "contact" iteration="iterator">
<label>Name</label>
<f:form.textfield property="contacts.{iterator.index}.name"
value="{contact.name}"/>
[something more]
</f:for>
The knack with the iterator.index works fine. It finds it way through
the enterprise controller. Very nice even if it is not documented anywere.
Best regards
Stefan Padberg
Am 20.05.2014 16:08, schrieb Stefan Padberg:
> Hi,
>
> there is a model "enterprise" with attributes, one of them containing
> all the contact persons of that enterprise.
>
> In TCA it is of type "inline" (1:m relation), thus the user can add and
> edit the contact persons from within the enterprise mask.
>
> This mechanism is to be reproduced in the frontend. So in my edit form
> for the enterprise model I write for instance:
>
> <f:for each="{enterprise.contacts}" as="contact" iteration="iterator">
> <label>contact name</label>
> <f:form.textfield
> property="contacts.{contact.uid}.name"
> value="{contact.name}"/>
> [something more]
> </f:for>
>
> But fluid engine does not accept the property attribute. What is the
> correct syntax for the property?
>
> Best regards
> Stefan Padberg, Wuppertal
>
>
More information about the TYPO3-dev
mailing list