Body field in email/handlers does not work with states

Created on 10 October 2023, 9 months ago
Updated 7 April 2024, 3 months ago

Problem/Motivation

When adding email handlers, I encountered the following problem: Look in video β†’ .

After I investigated the issue, I found out that the html tag does not have date attributes (data-drupal-states) that are responsible for hiding this element.

This correct one:

This incorrect one:

The second one is missing data-drupal-states, so states do not work.

Steps to reproduce

1. Go to any webform (or create new one).
2. Go to Settings > Emails / Handlers
3. Add a new email.
4. Scroll to Message > Body and try to change select to any.
If you notice, this will be available every time:

<p>Submitted on [webform_submission:created]</p>
<p>Submitted by: [webform_submission:user]</p>
<p>Submitted values are.
[webform_submission:values]

Proposed resolution

This form is built here webform/src/Plugin/WebformHandler/EmailWebformHandler.php. So I made a simple solution, added the 'webform_codemirror' type to all elements. Line 542. If anyone has any ideas on how best to fix this, I would be grateful.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: cannot reproduce

Version

6.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024