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

Instant access to 390+ Bricks code tutorials with BricksLabs Pro