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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland’s picture

Status: Active » Needs review
FileSize
590 bytes
65.83 KB

Fix and screenshot with fix. Note that input elements that have the problem are still red as they should be.

quicksketch’s picture

Issue summary: View changes
Status: Needs review » Needs work

Thanks 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?

Liam Morland’s picture

Status: Needs work » Needs review
FileSize
590 bytes
quicksketch’s picture

FileSize
636 bytes

Thanks 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?

quicksketch’s picture

Status: Needs review » Fixed

I went ahead and committed #4 to both branches. Thanks again Liam for all your work.

quicksketch’s picture

Gah, 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.

Liam Morland’s picture

Looks good. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.