This code works as expected...
{% if submission.symptomCheckerSymptoms == "Itching" %}
it works
{% endif %}
... but when when multiple options are selected, it doesn't.
The field is a checkbox group. What am I doing wrong?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityThis code works as expected...
{% if submission.symptomCheckerSymptoms == "Itching" %}
it works
{% endif %}
... but when when multiple options are selected, it doesn't.
The field is a checkbox group. What am I doing wrong?
The solution is:
{% if "itching" in submission.symptomCheckerSymptoms.value %}
{% endif %}