Hi! I am using a function to create/update a new record. How to create line breaks in textarea field?
$record = new Product();
$record->description = 'Parameter 1: Lorem ipsum<br>Parameter 2: Lorem ipsum';
Saved record looks like this:
Hi! I am using a function to create/update a new record. How to create line breaks in textarea field?
$record = new Product();
$record->description = 'Parameter 1: Lorem ipsum<br>Parameter 2: Lorem ipsum';
Saved record looks like this:
Hi,
have you tried a simple
\n
Yes, unfortunately the effect is the same
How I do that is by inserting the line returning inside the code itself and it works fine with a SHIFT+RETURN key combination
$record->description = 'Parameter 1: Lorem ipsum
Parameter 2: Lorem ipsum';
\n should work.
summary:
label: ..
size: huge
span: auto
type: textarea
$model->summary = "first line \nsecond line";
$model->save();
Thank you, your solution works!