[TYPO3-mvc] Fluid - Setting an attribute in viewHelper by condition

David Bruchmann david at bruchmann-web.de
Fri Aug 20 14:23:11 CEST 2010


----- Ursprüngliche Nachricht -----
Von: Michael Feinbier <mf at hdnet.de>
Gesendet: Freitag, 20. August 2010 14:00:46
An:
CC:
Betreff: Re: [TYPO3-mvc] Fluid - Setting an attribute in viewHelper by 
condition
> you missed some commas here. Try:
>
> <f:form.checkBox name="name" value="value" additionalAttributes="{f:if
> (condition: '{object.submitOnChange}', then: '{onchange :
> 'submit()'}')}" />


I'm not quite sure but I suppose you've to use the escape-notation for 
'submit()' like Franz wrote:


<f:form.checkBox name="name" value="value" additionalAttributes="{f:if 
(condition: '{object.submitOnChange}', then: '{onchange : 
\'submit()\'}')}" />


Just try it ;)

Greets,
David


More information about the TYPO3-project-typo3v4mvc mailing list