[TYPO3-dev] Extbase fluid form with model object with relations

Helmut Hummel helmut.hummel at typo3.org
Sun Jan 5 23:24:51 CET 2014


Hi Marcel,

I'm not sure I got your question(s) right.

On 02.01.14 12:03, Marcel Utz wrote:

> 1:n relation field in form:
> <f:form.textfield property="addresses.0.firstName" />
> <f:form.textfield property="addresses.0.lastName" />

> The fields firstName and lastName are saved correctly to the domain model as a relation and if form is submitted correctly, they are saved correctly in the database.
> The problem is: those two fields are not validated (both have @validate NotEmpty in Model object address)
 > I'm working with TYPO3 4.7.2 and 6.1.7, errors in both versions.

In these TYPO3/ Extbase versions only the top level object is validated, 
*nested objects* are *not validated*. Support for recursive validation 
will be part of TYPO3/ Extbase 6.2

> and when form is submitted and there is an error, there is no value in the field anymore.
> I just tired as an attribute value="{customer.addresses.0.firstName}".
> But this shouldn't work because of this long number in the result (000000003ad617180000000018ca0c80).
>
> What do I have to do to implement a model object with relations in a fluid form correctly?

These are the parts I did not understand. Can you try to rephrase (in 
case they are still relevant)?

Kind regards,
Helmut

-- 
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org



More information about the TYPO3-dev mailing list