The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
/r/n characters in textarea fields - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: /r/n characters in textarea fields (/showthread.php?tid=537) Pages:
1
2
|
RE: /r/n characters in textarea fields - reddevil45 - Dec 30th, 2012 Didn't work exactly for me but found some decent workarounds for issues with this reference here: http://www.w3schools.com/php/php_ref_string.asp I used <?=str_ireplace('\r\n',' ',@$fields['problem_description'])?> It isn't a catch all for instance a double new line will show as "\r\n\r\n" however a single carriage return is parsed correctly. ucfirst() and ucwords() are also helpful for mandatory capitalization. Anyway it's a partial fix Don't know why this isn't resolved yet. RE: /r/n characters in textarea fields - Alan - Mar 12th, 2016 I wanted to revive this topic to ask for some help. I'm using 2.26 formtools with an external form. I'm able to display the form submission contents to the user on my "thanks" page but any ', ", or carriage return entered in a textarea field in the form gets displayed in the thanks page with escape slashes> For example, submitting this text into a textarea comments field in the form: You "DON'T" need to include contact information in your ad copy. Results in this text being displayed on the thanks page: You \"DON\'T\" need to include\r\ncontact information in your\r\nad copy. making the submitter think there's something wrong with their form submission. How do I suppress this behavior? |