This project is not covered by Drupal’s security advisory policy.
Vanilla SelectBox uses the vanillaSelectBox javascript library to make your <select> elements more user-friendly. This module is developed by taking the inspiration from chosen module.
Usage
By default, the module will automatically apply itself to any select elements that are visible, which is a reasonable default for which having vanillaSelectBox will be useful. To change or disable this automatic enhancement, you can change the selectors (or remove all selectors) from the Apply vanillaSelectBox to the following elements field on the vanillaSelectBox administration page /admin/config/user-interface/vanilla-selectbox.
FAPI #vanilla_selectbox property
For developers, you can force the vanillaSelectBoxto be applied or never applied to your select FAPI element by adding $element['#vanilla_selectbox'] = TRUE; or $element['#vanilla_selectbox'] = FALSE; respectively.
Field UI
You can force enable/disable vanillaSelectBox for certain field widgets: Select list (for both list and date fields), and Select (or other) list. If you have a field using one of these widgets, in the field settings, you will find an Apply vanillaSelectBox to the select fields in this widget? option with three values: Apply, Do not apply, or No preference (which will fall back to using the automatic application).
Update with Composer for Drupal 8-9
composer require drupal/vanilla_selectbox:[version] [NOT READY YET, COMING SOON]
for example:
composer require drupal/vanilla_selectbox:3.0.2
Manual Installation
- Download the vanillaSelectBox javascript library.
- [Drupal 8-9] Extract the plugin under libraries/vanillaSelectBox.
- Download and enable the module.
- Configure at Administer > Configuration > User interface > Vanilla SelectBox (requires administer site configuration permission)
- Installation via Drush
- A Drush command is provided in the latest versions for easy installation of the vanillaSelectBox plugin.
drush vanilla-selectbox-plugin
The command will download the plugin and unpack it in "libraries".
It is possible to add another path as an option to the command, but not
recommended unless you know what you are doing.
Similer modules
Project information
- Project categories: Accessibility, Developer tools
- Ecosystem: UI
- Created by msankhala on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.



