Document how to disable on a specific field if needed

Created on 9 May 2022, over 2 years ago
Updated 29 October 2024, 3 months ago

Problem/Motivation

There are times when we may not want to have select2 implemented on specific selects. There is the ability to suppress select2_all via a form alter, but it's not documented.

Steps to reproduce

Create or find a select that has enough options that select2 activates, but as a user it may not make sense to have it as a select2.

Proposed resolution

Document how to disable select2 for specific fields using a form alter and adding the `$form['my_select']['#select2'] = false;`

Remaining tasks

Probably easy to document on the project page?

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Active

Version

1.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States jrearick Iowa

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine nnevill Lutsk

    That works for version 8.x-1.3:

    $form['my_select']['#select2'] = false;

    So makes sense to add that at least to README.

Production build 0.71.5 2024