Results 1 to 3 of 3

Thread: Using line break as list separator in html email

  1. #1
    Join Date
    Nov 2008

    Default Using line break as list separator in html email

    I have a multi-page form on which there are many questions with checkbox groups. I am trying to use template_list_sep and TEXT_SUBS to insert a line break as a list separator for the html email template, and having problems. I tried using <br>, \r\n and \n as strings in template_list_sep and could see from the hidden values being passed from one form page to another that the html code for a line break had been inserted between the list values, but the <br /> is just getting printed in the html email (including extra ones between null values), and not creating a line break.

    It's not clear to me from the array
    array ("srch"=>"#< *br */? *>#i",    "repl"=>"<br />",),
    under TEXT_SUBS in FormMail v8.29 for inserting an actual line break which characters should be entered in template_list_sep to produce the proper result.

    Am I missing something simple here and can anyone offer the solution for using line breaks as separators in html emails?

  2. #2
    Join Date
    Mar 2004

    Default Re: Using line break as list separator in html email

    this works for me:
    HTML Code:
    <input type="hidden" name="template_list_sep" value="<br>">
    looking at teh version history, u need 8.30 or later, i think

  3. #3
    Join Date
    Nov 2008

    Default Re: Using line break as list separator in html email

    After some testing I found that your method works, crabtree, as well as replacing the default comma with <br> as the template_list_sep in formmail.php. However, it does not work if you also try to pass the string of checkbox group values from one form page to the next as an input type="hidden", like you can with other single values. That was my mistake. The string of values can be passed that way, and the line break is inserted between each checkbox value, but prints itself as <br> in the html template rather than creating a new line.

    This is an issue only with multi-page forms where needing to pass values from page to page before they are submitted to the template. One way to overcome this is to simply pass the string of values from one page to the next in a hidden div, styled "display:none", instead of input type="hidden". Unless, of course, you want to display the accumulating values on each subsequent form page.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Line break in condition message
    By oldflatop in forum Community Support
    Replies: 3
    Last Post: 16-Dec-2010, 01:27 AM
  2. add line break in email
    By sublmnl in forum Community Support
    Replies: 1
    Last Post: 08-Jun-2010, 03:06 AM
  3. Form Field Value in HTML Email Subject Line
    By dmarion in forum Community Support
    Replies: 5
    Last Post: 12-Feb-2009, 05:20 PM
  4. Unwanted line breaks in HTML email from form
    By GEE in forum HOWTO Guides and Tips
    Replies: 3
    Last Post: 17-Jan-2008, 01:27 PM
  5. Can I format line breaks without html emails ?
    By Tiomago in forum FormMail Subscription Support
    Replies: 3
    Last Post: 17-Oct-2005, 08:25 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts