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.
Based on http://getbootstrap.com/css/#forms-validation form error class should be has-error
Comment | File | Size | Author |
---|---|---|---|
#1 | bootstrap-form-error-class-2151613-1.patch | 507 bytes | el7cosmos |
Comments
Comment #1
el7cosmosComment #2
bago CreditAttribution: bago commentedbut has-error should be added at input tag level, not on the wrapper level.
Comment #3
el7cosmosComment #4
bago CreditAttribution: bago commentedYou are right! Sorry!
I also noticed that bootstrap_form_element function ignores #attributes received in input and creates a new $attributes method so there is no way to use THEME_preprocess_form_element in order to add custom classes to the wrapper element.
Maybe adding this line at the top of the method could help:
Comment #5
markhalliwellThanks @el7cosmos!
Committed 54d692c to 7.x-3.x:
Comment #6
markhalliwellComment #9
markhalliwellI'm just moving this back to 7.x. If this needs re-evaluation in 8.x, create a new issue.