-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Add field labels to tokens in "Send form results" message #14998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add field labels to tokens in "Send form results" message #14998
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 7.x #14998 +/- ##
=========================================
Coverage 65.83% 65.83%
Complexity 35031 35031
=========================================
Files 2303 2303
Lines 140838 140838
=========================================
+ Hits 92716 92717 +1
+ Misses 48122 48121 -1 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good. Can you please mention in the PR description why the codeception library needed an upgrade and why the app/bundles/FormBundle/Resources/views/FormTheme/SubmitAction/_form_submitaction_sendemail_widget.html.twig
file was deleted?
Added note under JavaScript section about the removal of Mautic.insertTextInEditor. Developers should use Mautic.insertHtmlInEditor instead.
@escopecz, The composer file reverted to its previous state. I ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, the enhancement works as described:
Description
Currently, when inserting form result tokens into the message field of the "Send form results" action, only the values are included. This makes it difficult to understand the context of each value in the resulting email. This update modifies the token insertion to include both the field label and value, improving clarity for email recipients.
Use story
As a Mautic user
I want field labels to be included when I insert tokens into the message of the "Send form results" action
So that the form values in the resulting email are clear and meaningful
Changes,
_form_submitaction_sendemail_widget.html.twig
The template located at
app/bundles/FormBundle/Resources/views/FormTheme/SubmitAction/_form_submitaction_sendemail_widget.html.twig
is no longer used and can be safely removed. Cleaning up dead code to reduce maintenance overhead.📋 Steps to test this PR:
<label>: {formfield=field_alias}
For example:
First Name: {formfield=first_name}
<strong>Last Name</strong>: {formfield=last_name}