allow form elements to override Chosen library options

Created on 18 March 2024, 9 months ago
Updated 17 September 2024, 3 months ago

Problem/Motivation

It would be useful if individual form elements could override the options passed to the Chosen library. For example, a select element whose items are all long_machine_names_with_underscores might want to force search_contains = TRUE.

This could be done if this line added to what was potentially already there rather than clobber:

  $element['#attached']['drupalSettings']['chosen'] = [

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs work

Version

4.0

Component

Code

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024