Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When using the date module with "Render as a regular field" enabled date fields end up with .date-form-element-content-multiline
styling even though they shouldn't.
This is due to #wrapper_attributes
being double implemented, looks like this was caused by #2189117: Allow preprocessed wrapper attributes on bootstrap_form_element().
Possible fix:
function bootstrap_form_element(&$variables) {
...
- if (empty($element['#wrapper_attributes'])) {
+ if (empty($element['#bootstrap_wrapper_attributes'])) {
- $element['#wrapper_attributes'] = array();
+ $element['#bootstrap_wrapper_attributes'] = array();
}
- $wrapper_attributes = &$element['#wrapper_attributes'];
+ $wrapper_attributes = &$element['#bootstrap_wrapper_attributes'];
...
}
Comments
Comment #2
markhalliwellThe
#wrapper_attributes
property is a pretty standard one. I'd almost say that it's the date module that isn't setting things properly in the first place. There shouldn't be any need for a prefixed property in this project.Comment #3
markhalliwellNo response.