Single

Last updated: April 12th 2020

Fetching Data is very easy. Like any other Dropdown or Radio button, You just have to use the field short name to grab the field value. {{ myField }} where myField is short name of field you have created. You can use variables to fetch Label and other extra fields you have passed in JSON too.

Value

You can fetch value of field in many ways. Here are few examples:

{{ entry.myField }} }}
{{ entry.myField.getValue() }} }}
{{ entry.myField.value }} }}

Label

You can fetch label of current selected option with:

{{ entry.myField.label }} }}
{{ entry.myField.getLabel() }} }}

Extra Fields

All the extra fields you have passed in JSON option will be stored in extra variable. This will be an ARRAY variable that will store all your extras.

{% set extras = entry.myField.getExtras() %}
{{ extras.extraField }}

// Where extraField is a variable passed in JSON along with value and label. }}
{% set extras = entry.myField.extras %}
{{ extras.extraField }}

// Where extraField is a variable passed in JSON along with value and label. }}