Component

Webform

Webforms in Drupal are user-generated forms mostly, To support consistent form theming, we are taking the same approach as the form component , where everything has to live in a fieldset.

 

Added the webform title

The webform title is now available in the template to print as follows:

{{ title }}

 

Better theme-able HTML

{{ attach_library('compony/form') }}
<form{{ attributes.addClass('form') }}>
  {{ attach_library('compony/fieldset') }}
  <fieldset class="js-form-wrapper form-wrapper fieldset">
    <h3 class="legend">
      <span class="fieldset-legend">{{ title }}</span>
    </h3>

    {{ title_prefix }}

    {{ children }}

    {{ title_suffix }}
  </fieldset>
</form>

The webform is now by default also using the form component and the fieldset component.

This component relies on the form component and the fieldset component.

webform
Responsive
Accessible
HTML
2 downloads
horizontal beam No open issue

comments

No comments yet