Welcome Guest, Not a member yet? Register   Sign In
Parser loop not working if you have 2 identical loops with slightly different code
#1

[eluser]iKode[/eluser]
I hope that title was descriptive enough, the parser does not seem to work in this case

Code:
<p>Male Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="m_id_{id}"  /&gt; <label for="m_id_{id}">{label}</label></p>
{/age}

<p>Female Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="f_id_{id}"  /&gt; <label for="f_id_{id}">{label}</label></p>
{/age}

It will render the first loop , but not the second. if I do the following ( obviously its wrong to have 2 identical label ids ) the parser will work.

Code:
<p>Male Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="id_{id}"  /&gt; <label for="id_{id}">{label}</label></p>
{/age}


<p>Female Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="id_{id}"  /&gt; <label for="id_{id}">{label}</label></p>
{/age}

The only difference I see is that inside of the loop is different. This is the output:



Male Age
18-24
25-29
30-39
40-49
50+


Female Age
{age}
{value}
{/age}


Any ideas?
#2

[eluser]popovich[/eluser]
This question is quite old, but it is on my list right now. Any workarounds or tips?




Theme © iAndrew 2016 - Forum software by © MyBB