0

I have a matrix field in a low variable and I would like to access the loop value (count) of the row. The loop runs throug without any problem and the values are shown on only the count isn't working

This is the code:

{exp:low_variables:parse var="lv_Form" multiple="yes"}

        <div class="radio-style">
            {lv_Form:count}
            {count}
            {lv_Form:row_count}
            <input type="radio" id="dest_0{lf_Form:count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{lv_Form:count}">{lvFormDest_{user_language}} {lvFormStartDate format="%m/%Y"}</label>
        </div>                          
{/exp:low_variables:parse}

This is the result:

<div class="radio-style">
                        {var:count}
                        {count}
                        count
                        {lv_Form:row_count}
                            <input type="radio" id="dest_0{count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{count}">Tenerife 12/2015</label>
                        </div>



                        <div class="radio-style">
                        {var:count}
                        {count}
                        count
                        {lv_Form:row_count}
                            <input type="radio" id="dest_0{count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{count}">Nicaragua 12/2015</label>
                        </div>



                        <div class="radio-style">
                        {var:count}
                        {count}
                        count
                        {lv_Form:row_count}
                            <input type="radio" id="dest_0{count}" name="destination" value="0{lv_Form:count}" /><label for="dest_0{count}">Nicaragua 02/2016</label>
                        </div>

So you see that the loop works well except for the count value and as you can see I tryed all options.

Cheers

1

I found it!

I was trying to use a LV field tags to get the row count of a matrix field while I needed to use the matrix field tag {row_count}.

{exp:low_variables:pair var="lv_Form"}                  
    <div class="radio-style">
        <input type="radio" id="dest_0{row_count}" name="destination" value="0{row_count}" /><label for="dest_0{row_count}">{lvFormDest_{user_language}} {lvFormStartDate format="%m/%Y"}</label>
    </div>              
{/exp:low_variables:pair}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.