JetEngine Field Value(s) and Label(s)

A few users in the Bricks forum wanted to know how to retrieve the label that corresponds with the selected value when the type of JetEngine's field is Radio or Checkbox or Select.

This Pro tutorial shows how we can create a custom function that takes the field name/ID as the parameter and outputs the selected value's label. For fields that allow multiple values, the labels will be comma-separated.

Consider this field group attached to Pages:

Field group being populated on a sample Page:

Displaying the selected value

Edit the Page or the singular Page template with Bricks and select your custom field from the "Select dynamic data" picker.

Output:

For fields that allow multiple values, enable "Save as array" for the field.

Displaying the selected label

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 524 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

JetEngine Checkbox Condition in Bricks

JetEngine Checkbox Condition in Bricks

How elements in Bricks can be conditionally output depending on the selected option from a JetEngine checkbox field.
Categories:
Tags:
JetEngine Term Image in Bricks

JetEngine Term Image in Bricks

How to retrieve the URL of a Media type of a JetEngine custom field attached to a taxonomy term.
Categories:
Tags: