Seems like it should be simple but it's not working for me.

{% for option in entry.contributionType %}
     <li> {{ option.value }} </li>
{% endfor %}

This code outputs the option's label instead of the value. I feel like I'm going crazy.

  • That should work. Have you tried {{ option.label }}:{{ option.value }}? – Douglas McDonald Nov 12 '14 at 23:36

Ok, just figured it out. Apparently, when I changed the value of the fields in the settings I had to re-save all entries that used that field. And not just re-save them, but reset the value in the field as well, because it had lost it's checked value when I opened the entry up to edit it.

I see now the warning in the field settings I had previously overlooked, "Changing this may result in data loss."

| 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.