Multi-Select Liquid Markup Case Statement

1 Comments

  • Christopher Kennedy
    Zendesk Developer Advocacy
    Hi Ronald,
     
    The multi-select value will be a string of the selected tag values for the field separated by a space.  The simplest approach to evaluating the selected values involves using an if statement with the contains operator.  So from your example:
     
    {% if ticket.ticket_field_80818947 contains 'VALUE_1' %}
    <p>Content for VALUE_1</p>
    {% endif %}
    {% if ticket.ticket_field_80818947 contains 'VALUE_2' %}
    <p>Content for VALUE_2</p>
    {% endif %}
     
    If the selected value is VALUE_1 or VALUE_2, the content for that value is displayed.  If both are selected, then the content for both values are displayed.
     
    Best,
    0

Please sign in to leave a comment.

Powered by Zendesk