Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Alternative to the Select (or other)'s Term widget.
Objectives & differences
- Supports multiple vocab sources
- Grouping option if multiple vocabs used for select lists. Core patch required. *
- Stores both the term ID and value in the database.
- Widget settings switch between standard Option widgets (select list, radios or checkboxes) or the Select or other version
- No auto-create for terms nor updating field settings
- Std term formatter uses the plain text or linked term title options, with either std list or inline options
When using the Other option (Select or other is a dependency for this feature)
- Automatically remembers deleted terms
* Group option requires a core patch
#1180992: [D8] list_field_validate() doesn't seem to accommodate select lists with <optgroup>
No patch for Drupal 7, just a single line mod.
modules/field/modules/list/list.module, line 391
- $allowed_values = list_allowed_values($field, $instance, $entity_type, $entity);
+ $allowed_values = options_array_flatten(list_allowed_values($field, $instance, $entity_type, $entity));
Supporting organizations:
Programming time
Attachment | Size |
---|---|
Viewing both formatting options | 8.32 KB |
Same node view, but with term B deleted | 13.3 KB |
Editing same node, but with term B deleted | 19.52 KB |
Project information
- Created by Alan D. on , updated