Value for select input

When adding select input to a document type it is only possible to add one string for each option.
This string is then basically both the value and the label for the dropdown that is presented to the user in Prismic.
In html a select input is made up of one or more options each option has a value and a label. Most of the time the label is just a presentation but the value is what matters the most. Sometimes value and label can be the same.

What I suggest is that for a select input in Prismic one should be able to add both value and label.

Prismic api would then deliver back something like:

[field_name] : {value:blue, label: Blue}

ACF for wordpress solves the this problem like this


I know I could do this in code by splitting the string by ':', but in my oppinion it would be better that Prismic would handle that.

1 Like

A post was merged into an existing topic: