1

I'm not sure if this is an EE bug or if I'm doing something wrong. I'm looping through my "tournaments" channel entries and for each entry I'm looping through a "teams" channel that has a relationship to the tournaments channel. Looping is fine with {parents}.

I'm trying to test a radio button field value and create a dropdown based off that.

I can spit out the value and it works fine and spits out the correct value if I just use {parents:team_confirmed:value}. However my {if} doesn't seem to work properly.

Here's my code in a nutshell:

{parents field="tournaments_attending"}

       other stuff

       <select name="confirmed">
           {if parents:team_confirmed:value == 1}
               <option value="Yes" selected>Yes</option>
               <option value="No">No</option>
           {if:else}
               <option value="No" selected>No</option>
               <option value="Yes">Yes</option>
           {/if}
       </select>

{/parents}
0

I figured out why for anyone curious. It wanted curly brackets inside the {if}.

{if {parents:team_confirmed:value} == 1}
| 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.