Select/Multiselect options query with Structure

Hi there,

I would like to dynamically generate options of a multi-select field with data from another page (“apropos”) stored in a structure. This should be very simple. But after a number of unsuccessful attempts, I’m out of ideas what the problem might be here…

With a multiselect, i’ve got this error message in my panel : “this.state.map is not a function”. With a select, I’ve got the correct number of options, but rows are empty.

My query :

          prod:
            label: Production
            type: multiselect
            options:
              type: query
              query: site.find('apropos').equipe.toStructure
              value: "{{ item.nom }}"

the structure field in page 'apropos" :

- width: 1/2
    fields:
      equipe:
        label: Équipe
        type: structure
        columns:
          nom: true
          poste: true
        fields:
          nom:
            type: text
            width: 1/2
          poste:
            type: text
            width: 1/2
          mail:
            type: email
            width: 1/2
          tel:
            label: Téléphone
            type: tel
            width: 1/2
          bio:
            type: textarea
            width: 1/1
          portrait:
            type: files
            query: page.images.template('image')
            uploads:
              template: image
            max: 1
            layout: cards

Any idea what could go wrong?

Thank you for your help.

What’s your Kirby version?

The last one, 3.6

That’s not the last one, that would be 3.8.x. And you are using Kirby 3.8 syntax.

For 3.6 syntax: Multiselect | Kirby CMS

Note that we have different versions of the docs for every major 3.x version.

Thank you so much for your reply. I’m surprised because I initialized my project with Composer.
I try by changing version.

I’ve got this in my panel with Kirby 3.8.1 (And I actually have 4 rows in my structure field.)
By the way, I had tried the old syntaxes as well.

Capture d’écran 2022-11-03 à 19.32.00 (2)

You should also define a text prop, not only value,see docs. You have 4 options, but the text is not shown.

Une fois n’est pas coutume… You are my saviour. Thank you so much.
I don’t know how I could have missed it. Definitely time to end the day.:see_no_evil: