I have added some containers to my webforms to help segment and control the layout of my forms. Works great.

As part of this, I added element attributes (custom classes) to the containers to help my styling.

I had hoped these element attributes would also be available for the same container elements on the HTML submission pages but they are missing.

Comments

danjordan created an issue. See original summary.

jrockowitz’s picture

Status: Active » Closed (works as designed)

The HTML markup for webform submission is very very basic and does not support custom attributes. I am not sure it makes sense to apply form element class to a submissions markup.

You can override webform-element-base-html.html.twig and implement hook_preprocess_webform_element_base_html() to create any submission markup that you need.

@see http://cgit.drupalcode.org/webform/tree/templates/webform-element-base-h...
@see http://cgit.drupalcode.org/webform/tree/includes/webform.theme.inc#n427