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.
I am observing that when I add a custom class in the "Wrapper CSS classes" field in a form component settings, then the default class "form-item" gets removed and replaced by the new class.
In some previous version this behaviour was a little different: the new class was simply being added ("form-item"
was not being removed).
Is this the desired behaviour or is it a bug?
Comment | File | Size | Author |
---|---|---|---|
#2 | webform-adding_custom_wrapper-2336445-1.patch | 1.01 KB | DanChadwick |
Custom-class-removes-form-item.JPG | 46.58 KB | arx-e | |
Custom-class-removes-form-item-code.JPG | 65.4 KB | arx-e |
Comments
Comment #2
DanChadwick CreditAttribution: DanChadwick commentedYes it's a bug. Oddly it was already fixed in 8.x in what looks to be a bit of code cleanup..
Committed to 7.x-4.x (only).
Comment #3
arx-e CreditAttribution: arx-e commentedThank you Dan!
Comment #4
kevinedmister CreditAttribution: kevinedmister commentedThe Patch from #2 fixes the issue and fixes conditionals breaking because of the missing classes.
Comment #5
DanChadwick CreditAttribution: DanChadwick commentedPicked up the 7-10 split, I guess. Is there an issue for the conditional/custom wrapper class issue?
Comment #7
rsacher1 CreditAttribution: rsacher1 commentedUsing webform-7.x-4.7
A custom CSS can be applied as Wrapper - showing up in code.
On next time opening that field in Webform-Designer the Wrapper-Field is empty - resulting in overwriting the first custom CSS with "" - so custom CSS is lost on next save.
Comment #8
DanChadwick CreditAttribution: DanChadwick commentedRe #7. Please open a new issue and better describe how to reproduce the issue. I don't know what "Webform Designer" is.