Search code examples
drupal-8drupal-webform

Can one of the fields in a Drupal webform be Wysiwyg HTML field?


I want to have a field in a Drupal Webform where users can input some formatted HTML (tables, headers, etc.) Is there a way to do that?


Solution

  • Yes. The form element is called "Text format." This sounds like a format selector of some kind, but it's actually a text element. If you set it to "Basic HTML," for example, the CKEditor WYSYWIG loads. The image below is an example (the 'field' labeled Notes/URL(s)). If users wish to enter HTML directly, the code view button in the toolbar allows for that.

    enter image description here

    Here's what the initial page of the webform config looks like for this element... enter image description here