[Flow] checked checkboxes from model property

Nicola Cerchiari nicola.cerchiari at gmail.com
Tue May 26 11:32:29 CEST 2015


Hi Damiano,
thanks for your suggestions, but in the meanwhile I found my solution
developing a InArray ViewHelper and passing the haystack of IDs from the
action.

Bests,
Nicola

Il giorno lun 25 mag 2015 alle ore 17:00 Damiano Faccioli <
damiano.faccioli at posit.it> ha scritto:

> Hi Nicola,
> I'm using checkbox but my  case is not exactly as your: I haven't m2m
> relation; but I think it can work for you also.
>
> In my new.html template the snippet is:
>
> <f:for each="{tripTypes}" as="type" key="key" iteration="itemIteration">
>     <label class="radio-inline"><f:form.radio property="roundTrip"
> id="type{key}" value="{key}"
> checked="{itemIteration.isFirst}"/>{type}</label></f:for>
>
> as you can see I've forced the default checked; in the same way I've forced
> the checked element in the edit form as you can see below in the snippet:
>
> <f:for each="{tripTypes}" as="type" key="key" iteration="itemIteration">
>     <label class="radio-inline"><f:form.radio property="roundTrip"
> id="type{key}" value="{key}"
>
>
> checked="{expense.roundTrip->f:format.number(decimals:0)}==
> {key}"/>{type}</label>
>
>
> </f:for>
>
> In my code the Item collection is tripTypes, in checked condition you can
> use any property of the current iteration item.
>
> I hope this can help you, if you post some snippet I can help you.
>
> D.
>
> --
> Damiano Faccioli
> Posit sc
> via Guardini, 58 - 38121 Trento
> website: www.posit.it
> Telefono: 0461 822068
> e-mail: damiano.faccioli@ <damiano.faccioli at gmail.com>posit.it
> <damiano.faccioli at posit.it>
> Skype: rifaccio
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>


More information about the Flow mailing list