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.
In Webform with Options Element, create a select component, customize the keys, make two keys the same, and save. An error message will appear and the entire Options Element area will have the stop sign as the background image.
Comment | File | Size | Author |
---|---|---|---|
#6 | options_element_followup-2114503.patch | 792 bytes | quicksketch |
#4 | options_element-2114503.patch | 636 bytes | quicksketch |
#3 | options_element_2114503_error_message.patch | 590 bytes | Liam Morland |
#1 | Screen shot 2013-10-17 at 14.46.35.png | 65.83 KB | Liam Morland |
#1 | options_element_2114503_error_message.patch | 590 bytes | Liam Morland |
Comments
Comment #1
Liam MorlandFix and screenshot with fix. Note that input elements that have the problem are still red as they should be.
Comment #2
quicksketchThanks Liam. This patch doesn't seem to apply to the 7.x-1.x branch though. Could you take a look at the latest Git version and see if adjustments need to be made?
Comment #3
Liam MorlandComment #4
quicksketchThanks Liam, I backported this to D6 (which doesn't use an array for $element['#attributes']['class'], and while I was in there I figured that *some* class was still helpful, if you wanted to make the element have some kind of overall styling. But considering core's default styling is very broad, leaving the default "error" class seems like a bad idea. This patch uses your approach but changes it to be the class "options-error" instead of removing the class entirely. Seem okay?
Comment #5
quicksketchI went ahead and committed #4 to both branches. Thanks again Liam for all your work.
Comment #6
quicksketchGah, that's what I get for being hasty. This followup patch is needed on top of #4 to use the $classes array, making this work in both D6 and D7.
Comment #7
Liam MorlandLooks good. Thanks.