Multiselect field, hide the value

Hi,

I use a multiselect field to display some “Candidat” users.
This is my blueprint code for this:

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')
              text: "{{ user.name }}"
              value: "{{ user.id }}"

I set the value with "{{ user.id }}" to store the user id in the txt file but it appears in the select box (see the screenshot below)

May I just display the user name and hide the user id? If yes how?

I suppose you’d like to be able to remove this from the output entirely, but in the meantime in a custom panel css:

.k-multiselect-option .k-multiselect-value { display: none; }

Does the job.

1 Like

There is also an idea request here: https://github.com/getkirby/ideas/issues/127

There was a PR, but that was not merged in favor of future, better implementation. But the CSS solution should do it for the time being.

Ok, I will use the css trick while waiting for the acceptance of the PR
Thank you both :slight_smile: