Master Posted July 5, 2017 Report Share Posted July 5, 2017 I want to remove line breaks in my text areas on a details page. How can I do that? Quote Link to comment Share on other sites More sharing options...
MayMusic Posted July 5, 2017 Report Share Posted July 5, 2017 Add Header/Footer to details page >> Go to Footer and click on Source button >> Use the code below <script> document.getElementById('Mod0EditRecord').onmouseover = function (){ var txt = new Array ("EditRecordFIELD1NAME", "EditRecordFIELD2NAME", "EditRecordFIELD3NAME"); for (var i=0; i < txt.length; i++){ mytxt = document.getElementById(txt[i]).value; document.getElementById(txt[i]).value = mytxt .replace(/(\r\n|\n|\r)/gm,""); }} </script> Replace FIELD1Name and the rest to the actual field names in this line: var txt = new Array ("EditRecordFIELD1NAME", "EditRecordFIELD2NAME", "EditRecordFIELD3NAME"); If you have more than 3 fields to remove line break more you can add the IDs to this line. 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.