Multiselect field in a structure field

Hi,

I use a structure field with two fields inside:

  • a multiselect field populated by a collection (list of users with role “candidat”)
  • a select box

When I add a user with the multiselect field and validate the structure field (click on add), the preview of this field is three dots.

The multiselect is set to “max: 1” to add only one user per row in the structure field.

How to replace the three dots by the content of the multiselect field?
Here: “Prof Behnam Fahimnia”

This is some screenshots to illustrate:


The structure field is declared like this in the blueprint:

proposalParticipantsUsers:
        label: All registered participants except the author
        width: 1/2
        type: structure
        fields:
          participantUser:
            label: Add a participant for this project
            required: true
            max: 1
            width: 2/3
            help: This list displays all registered candidats.      
            type: multiselect
            options: query
            query: 
              fetch: kirby.collection('candidats')
          participantUserMain:
            label: Main applicant
            type: checkboxes
            options:
              main: 'Yes'
            width: 1/3

Any idea? Thx for your help …

You can create a custom preview for the multiselect field or use this plugin: https://github.com/sylvainjule/kirby-previews

There will be better core support in the next version: https://github.com/getkirby/kirby/commit/412c340e83c6d90736aad03a655ded1f285ede3d

Perfect :+1:

I will try one of this solution, thank you :slight_smile: