2

I'm trying to create a gallery plugin with a component option to select which gallery or galleries to display. How do I make the dropdown to be multiple selected options, not just one.

Ex:

<select multiple>
    ...
</select>

Gallery component:

public function defineProperties() {
    return [
        'gallery' => [
            'title'        => 'Galleries',
            'description'  => 'Select which gallery to display',
            'type'         => 'dropdown'
        ]
    ];
}


public function getGalleryOptions(){
    return Galleries::select('id', 'name')->orderBy('name')->get()->lists('name', 'id');
}

Any help would be much appreciated.

Ronnie
  • 39
  • 6
  • Maybe use the taglist field instead? You can use it with relations too – dragontree Jul 24 '17 at 13:21
  • I believe taglist field is for the backend forms. What i'm looking for is to have multiple select dropdown of the type 'dropdown' for the components' properties. It should enable the user to select one or more galleries to show on the page or partial. – Ronnie Jul 25 '17 at 06:50
  • @Ronnie did you find a solution after all? – Amaury Leproux May 21 '19 at 14:08

0 Answers0