In a form I have a textarea that the user can write using also carriage return but I need to save thew textarea in the DB without CR.
In the action panel of the form I have prepared a "Custom Code" action before the "Save data" action with the following code:
<?php $str = $_POST['lc_field1']; $str = str_replace(array("\n","\r"), "§", $str); // following string is just to verify if the carriage return is changed in something else and it is.
document.print($str); // here I need to use something like {'lc_field1'} = $str but I was unable to find in Internet a PHP statement that can do what I need.
?>
Please note that lc_field1 is the name of the textarea field in the form and also the name of the column in MySqli DB.
In a form I have a textarea that the user can write using also carriage return but I need to save thew textarea in the DB without CR.
In the action panel of the form I have prepared a "Custom Code" action before the "Save data" action with the following code:
<?php
$str = $_POST['lc_field1'];
$str = str_replace(array("\n","\r"), "§", $str);
// following string is just to verify if the carriage return is changed in something else and it is.
// here I need to use something like {'lc_field1'} = $str but I was unable to find in Internet a PHP statement that can do what I need.
Is there someone that can help me? Thanks
Andrea
ChronoForms7 Video Tutorials