Selection
A field of type Selection gives you either a dropdown-style or a table-style way of selecting one or more predefined values.
The selection is represented as a Metafield with its string value matching the selected value:
<p>You have selected the value: {{ product.metafields.accentuate.selection }}</p>
Or, in case of multiple selected values, with each value listed using the "pipe" symbol ("|") as a separator token. You can use Liquid's 'split' filter on the Metafield to separate the values - like this:
{% assign selected_values = product.metafields.accentuate.selection | split: '|' %}
{% for selected_value in selected_values %}
<p>{{ selected_value }}</p>
{% endfor %}
Last updated