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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

  • DanChadwick committed dea4be1 on 7.x-4.x
    Issue #2336445 by DanChadwick: Fixed Adding custom Wrapper CSS classes...
DanChadwick’s picture

Status: Active » Fixed
FileSize
1.01 KB

Yes 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).

arx-e’s picture

Thank you Dan!

kevinedmister’s picture

The Patch from #2 fixes the issue and fixes conditionals breaking because of the missing classes.

DanChadwick’s picture

Picked up the 7-10 split, I guess. Is there an issue for the conditional/custom wrapper class issue?

Status: Fixed » Closed (fixed)

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

rsacher1’s picture

Using 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.

DanChadwick’s picture

Re #7. Please open a new issue and better describe how to reproduce the issue. I don't know what "Webform Designer" is.