I have enabled webform module on a Drupal 8 installation.

For some reason, there are default webform templates such as "Donation" and "Contact Us" which have their elements values translated in the translation UI at /admin/config/regional/translate. The problem is that some webforms templates have HTML markup in their elements value like the following:

    '#prefix': '<div class="container-inline">'
    '#suffix': '</div>'

This will prevent saving any value, drupal telling the user that there are translations with invalid HTML tags:

The submitted string contains disallowed HTML: information: '#title': 'Your Information' '#type': fieldset first_name: '#title': 'First Name' '#type': textfield '#required': true last_name


Regarding this issue, I have a few questions:

  1. what actions trigger the elements value availability in this interface? On install, on config save...?
  2. do the webform module really uses this interface to translate the content of the forms?
  3. and if yes, am I missing a module or something to make it work?
  4. and if not, should this be considered as a bug? The closest issue I have found is this one: https://www.drupal.org/project/webform/issues/2913548

It looks like this is this template: https://cgit.drupalcode.org/webform/tree/modules/webform_templates/config/install/webform.webform.template_job_application.yml?id=a988217057ed5ba842a3722de01f2d07df59e5e1


1 Answer 1


Apparently, this was a side effect of the "translatability" of the elements value. A patch has been created by jrockowitz on the drupal issue tracker which will prevent having those values editable in the translation UI: https://www.drupal.org/project/webform/issues/2965060#comment-12587556

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.