[TYPO3-mvc] object value in array value in Fluid

Jacco van der Post jacco at id-internetservices.com
Tue Apr 19 20:38:54 CEST 2011


Hi


I have a radio button :

<f:for each="{question.questionAnswers}" as="answer">
                 <li>
                 <f:form.radio name="question_{question.uid}" 
value="{answer.uid}" checked="{checkedQuestion.{answer.uid}}" /> 
{answer.answer}
                 </li>
             </f:for>


As you can see I am struggling with the syntax in "checked" value.


checkedQuestion is an array which gets it's value of a session via the 
controller.

When someone goes 1 step back in the form the corresponding radio button 
should be checked.

So when for example answer.uid = 2, I want checked to get 
{checkedQuestion.2}

Is there a syntax possible something like checkedQuestion[answer.uid] or 
could I do it in another way?

thx




-- 
Kind Regards

Jacco van der Post


More information about the TYPO3-project-typo3v4mvc mailing list