this works for me:
looking at teh version history, u need 8.30 or later, i thinkHTML Code:<input type="hidden" name="template_list_sep" value="<br>">
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
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 arrayunder 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.Code:array ("srch"=>"#< *br */? *>#i", "repl"=>"<br />",),
Am I missing something simple here and can anyone offer the solution for using line breaks as separators in html emails?
this works for me:
looking at teh version history, u need 8.30 or later, i thinkHTML Code:<input type="hidden" name="template_list_sep" value="<br>">
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks