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.
Hello!
I really apologise if the issue is already solved - I've been googling for 2 hours and couldn't find the solution. When a form is submitted, the email message contains some excess line breaks (<br />
) that need to be removed. They appear in the middle of a line which is not wanted. The desirable result is one line displaying one field (Label: Value) without any breaks. How can I remove them? Please, help me out :)
Comment | File | Size | Author |
---|---|---|---|
2013-12-12_1749.png | 7.33 KB | EternalLight |
Comments
Comment #1
quicksketchComment #2
quicksketchHm, I'm not sure what could be causing this. It looks like you're sending e-mails as HTML. So do you have the MIME Mail module installed? If you send the mails as plain-text, does the same problem occur?
Comment #3
associate CreditAttribution: associate commentedThink this is the same issue I'm having
https://drupal.org/node/2157325
Comment #4
quicksketchThanks @associate for filing that bug report at #2157325: Email Results Formatting Issue. Let's consolidate these two requests here. From that issue:
Webform indeed includes some handling to prevent long lines in responses. According to the spec for e-mails, all mails are *supposed* to be wrapped after a certain text length. However, this doesn't apply to HTML-sent e-mails, which shouldn't be getting these
<br />
tags added.@associate is also correct that the more fieldsets you have, the more results get nested and the more likely the text is to wrap.
The code that is likely causing this wrapping is in theme_webform_element_text():
You can override this in your theme to try an fix the problem. Ideally, we'd find a way to prevent the problem from happening for all users, so if you come up with any good ideas, I'd be happy to review them for including in the main module itself.
Comment #5
DanChadwick CreditAttribution: DanChadwick commentedWhile 7.x-3.x is receiving critical fixes only, I think this issue still applies to 7.x-4.x.
Comment #6
DanChadwick CreditAttribution: DanChadwick commentedClosing for lack of activity. It's not clear whether this still happens in 7.x-4.x.