I’m having trouble getting the value of multiselect fields for a custom block preview after updating to 3.8.
I have a multiselect field (called size
) for layout options, the blueprint is set up so the option value is what I can get on the front end for a class name, and the option text is what I show on the panel as an indicator of what styling the block is set to currently:
size:
width: 1/2
label: Block Layout
type: multiselect
options:
width-33: 33%
width-40: 40%
width-50: 50%
width-60: 60%
width-100: 100%
Like so, how it used to look like on 3.7:
Except now on 3.8 I’m unable to access the field value/selected option(s) with .text
as I used to before on a block preview plugin:
<li v-for="item in this.content.size">
<span v-html="item.text"></span>
</li>
item
returns the selected option’s value (width-50
) for the multiselect, item.text
returns nothing on 3.8. var_dump
returns the same on both 3.7 and 3.8:
object(Kirby\Cms\Field)#300 (1) { ["size"]=> string(8) "width-50" }
I saw that the multiselect fields were reworked on 3.8 so that the option value is not shown anymore on the panel but I can’t figure out how that should affect being able to get the value/text of the selected option separately. Am I doing something wrong? Am I missing something? Is this just how the multiselects are now?
(I’m somewhat of a newbie still, sorry if I’m missing something extremely obvious ).