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

MustangGB created an issue. See original summary.

markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

The #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.

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

No response.