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.
At the end of Bootstrap's implementation of theme_webform_element() in the file templates/webform/webform-element.func.php, there is a direct call to the function bootstrap_form_element(). This works fine but means that a subtheme can not override theme_form_element() without also overriding theme_webform_element().
Simple fix:
// Render with bootstrap_form_element().
bootstrap_include('bootstrap', 'templates/system/form-element.func.php');
return bootstrap_form_element($variables);
Becomes:
// Render with bootstrap_form_element().
return theme('form_element', $variables);
Comment | File | Size | Author |
---|---|---|---|
#2 | override-bootstrap-form-element-2815741-1.patch | 519 bytes | duncan.moo |
Comments
Comment #2
duncan.moo CreditAttribution: duncan.moo at Western Cape Government commentedComment #3
duncan.moo CreditAttribution: duncan.moo at Western Cape Government commentedComment #5
markhalliwell