php - TYPO3 Femanager Template placeholder condition -
i have quite simple problem. want add star femanager inputfield if required.
i tried:
<f:form.textarea id="femanager_field_address" property="address" class="input-block-level" additionalattributes="{femanager:misc.formvalidationdata(settings:'{settings}',fieldname:'address')}" additionalattributes="{ng-model: 'address'}" placeholder="{f:translate(key: 'tx_femanager_domain_model_user.address')}{f:if(condition:{femanager:misc.isrequiredfield(fieldname: 'address', actionname: actionname)} == 1)->f:then('*')" /> </div>
but got textbox following placeholder:
adresse{f:if(condition:1 == 1)->f:then('*')
{f:if(condition:{femanager:misc.isrequiredfield(fieldname: 'address', actionname: actionname)} == 1)->f:then('*')
that's not valid fluid expression. because of that, fluid interprets can (which inner femanager:misc.isrequiredfield
viewhelper, renders 1
or more true
).
there 2 issues here:
when using
f:if
viewhelper in inline notation, supplythen
value argument viewhelper.example (simplified):
{f:if(condition: somevariable, then: '*')}
when using viewhelper in
condition
argument off:if
viewhelper, needs in string variable:example:
{f:if(condition: "{femanager:misc.isrequiredfield(...)}", then: '*')}
Comments
Post a Comment