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.
After a form validation, if there is an error in a chosen field, the field is not highlighted.
This is because the select field (which is correctly highlighted) is hidden and replaced with the chosen widget.
The chosen wiget should inherit the error class.
Comment | File | Size | Author |
---|---|---|---|
#6 | chosen-example.png | 45.4 KB | Pascal- |
Comments
Comment #2
stephane-v CreditAttribution: stephane-v commentedComment #3
stephane-v CreditAttribution: stephane-v commentedComment #4
DanieleN CreditAttribution: DanieleN commentedCan't reproduce this. (core 8.5.0 and chosen 8.x-2.5)
After submit a form the error show correct.
Please reopen this issue
Comment #5
DanieleN CreditAttribution: DanieleN commentedComment #6
Pascal- CreditAttribution: Pascal- commentedRunning into this issue as well.
The problem is not that the error is not showing up.
The problem is that it is not possible to style the chosen-container differently when there is an error since it does not copy the error class from the select list.
First div is a normal text field that works properly (with an error)
Second div is the chosen field, you can see the select element has the error class, but the chosen-container does not copy the error class, making it very hard to style it.
Comment #7
Pascal- CreditAttribution: Pascal- commentedComment #8
Pascal- CreditAttribution: Pascal- commentedComment #9
Pascal- CreditAttribution: Pascal- commentedTemp fix:
Comment #10
apaderno