cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
HTML mail doesn't include message line breaks
January 2, 2008
3:52 pm
Jeremy
Guest

Please replace the ??? with your data!

  • Your URL: http://???
  • The browser used: ???
  • cforms version: 7.0
  • Your Wordpress version: 2.3.2

[desc]: Hi, I'm using cforms 7.0 which really is wonderful in so many ways! One question I have though: on the Form Settings options page, I'd like to enable HTML within the Admin Email Message Options section.

However if I do so, and enter in the template text I want, including the {Message:} variable, the resulting email that gets sent to me when a user submits a message using the form, does not include any line breaks the user entered into the form. (I'm not using the "preformatted form" option – I'm creating my own email template).

Looking at the actual body text (ie. the raw email file straight off my mail server) of the email that gets sent to me from the form, I can see that the line breaks are there within the HTML section of the email, but of course they don't show up within any mail client because they don't have the <br> or <p> tags requred to make the line breaks show within the HTML portion of the email. With me so far?! :)

If I disable HTML and only use plain text for the admin email, then of course the line breaks show up, coz they are there in the plain text format.

I guess what's necessary, is for cforms to automagically insert <br> bits into the message when generating an HTML message. Is this currently possible in some way that I'm not aware of? Or if not, can it be added to any feature wishlist for a future version?

Cheers,
Jeremy

January 2, 2008
4:40 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

The preformatted form option allows you for both TEXT and HTML to quickly include all submitted data in a well formatted form.

If you decide to turn these options off and include only specific (or all) fields via the use of {variables} you need to consider for…

  • TEXT: Line-breaks are automatically inserted whenever you have entered a line-break in the text.
  • HTML: This configuration field does expect full HTML code, with all the benefits.

Here is what I usually do for HTML: I open up my favourite HTML editor and create a base layout of how I want the email to look like (because I'm lazy I tend to go with <tables>). Then I insert where required all my variables , double check the  layout and  then simply copy and paste to the above cforms HTML configuration field. 

It usually only takes me a few minutes to build that table (with a couple of columns) and inserting the variables.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
33 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3731

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5331

Posts: 18693

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)