Skip to main content
2 of 3
added 209 characters in body
Dakwamine
  • 171
  • 1
  • 7

Why do some webforms have their elements value in translation UI (/admin/config/regional/translate)?

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

etc...

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

Dakwamine
  • 171
  • 1
  • 7