Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Remove the section/fieldset titles from the mail content.
Steps to reproduce
We have an HTML structured webform. We use sections in order to organize the information in it and have a nice layout online.
Their titles are invisible on site.
However when receiving mail (both in HTML and clear text), the titles of the sections are visible.
I have tried different options for Submission display for the sections per single item, and there is no change.
Is there an option which I am missing?
Comment | File | Size | Author |
---|---|---|---|
#5 | 3307580-5.patch | 691 bytes | jrockowitz |
#5 | Screen Shot 2022-09-17 at 12.47.59 PM.png | 1.13 MB | jrockowitz |
#3 | Email-with-section-titles.jpg | 22.08 KB | joro78 |
Not_an_option_to_exclude.jpg | 386.72 KB | joro78 | |
section_container.jpg | 940.79 KB | joro78 |
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedComment #3
joro78 CreditAttribution: joro78 commentedComment #4
garth_powell CreditAttribution: garth_powell commentedI have the same issue. I would love to not have to customise the email to ensure fieldset titles are not visible in emails as that would create too much risk in maintaining forms
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commentedThe most reasonable compromise is that when a fieldset's submission display is set to a container with no title, the email should also respect this setting. Please review the attached patch.
This behavior change might have to be made via 6.2.x
Comment #6
pvbergen CreditAttribution: pvbergen at iqual AG commentedWe had a similar issue in one of the projects in which we needed to hide section titles. We have a simple patch using the elements title_display setting, but this approach make more sense. I've reviewed the patch with 6.1.x, the patch does the trick nicely. Do we need additional test coverage here?
I also thought about introducing a whole configuration for mail display in WebformElement, analogous to submission display. This way, the settings for submission and mail display would be independent. It might be overkill, but if there is an interest I could open a second issue.
Comment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commented