Bangalore Posted June 21, 2013 Report Share Posted June 21, 2013 I have a Submission Form, and when the automatic emails are sent, the text is all in one line, when the format is HTML. Please help Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 21, 2013 Report Share Posted June 21, 2013 If the system does not respect the break lines, you can try to replace all the breaks with <br />. Here is a sample code which can go to the footer of the submission page: <script> function f_txt(){ var str = document.getElementById('InsertRecordFIELDNAME').value; document.getElementById('InsertRecordFIELDNAME').value = str.replace(/n/g, <br />); } document.getElementById('caspioform').onsubmit=f_txt; </script> ***** Replace FIELDNAME with the actual field name. ***** Quote Link to comment Share on other sites More sharing options...
Bangalore Posted June 21, 2013 Author Report Share Posted June 21, 2013 Awesome , Thank you for the quick response. I will try it and let you know the results Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 21, 2013 Report Share Posted June 21, 2013 You can also add a rich text instead to your DataPage if your table has a text 64k field called "html_text". Your DP includes the field and form element is text area. These are the steps: 1. Place the following code in the DataPage header: <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/assets/skins/sam/skin.css"> <!-- Utility Dependencies --> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/element/element-beta-min.js"></script> <!-- Needed for Menus, Buttons and Overlays used in the Toolbar --> <script src="http://yui.yahooapis.com/2.5.2/build/container/container_core-min.js"></script> <script src="http://yui.yahooapis.com/2.5.2/build/menu/menu-min.js"></script> <script src="http://yui.yahooapis.com/2.5.2/build/button/button-min.js"></script> <!-- Source file for Rich Text Editor--> <script src="http://yui.yahooapis.com/2.5.2/build/editor/editor-beta-min.js"></script> 2. Place the following code in the DP footer: <script> window.onload = function() { var myEditor = new YAHOO.widget.Editor('InsertRecordhtml_text', { height: '400px', width: '600px', dompath: true, animate: true }); myEditor.render(); document.getElementById("caspioform").onsubmit = function() { myEditor.saveHTML(); //var myHTML = myEditor.get('element').value; } } </script> 3. Your webpage should have <body class="yui-skin-sam"> 4. The 'InsertRecordhtml_text' should be updated with your field name reference. Quote Link to comment Share on other sites More sharing options...
Bangalore Posted June 21, 2013 Author Report Share Posted June 21, 2013 Thanks again, I really appreciate it Quote Link to comment Share on other sites More sharing options...
andreww22 Posted July 10, 2013 Report Share Posted July 10, 2013 Thank you for this post. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.