properly display newline in "Show Data > Record View"

edwardfung1234 25 Oct, 2013
Hi,

I have a multi-line textarea field in my form.
The value is not displayed properly unless I put a <pre> tag around it.
It can be achieved by changing line 23 of "administrator/components/com_chronoforms/views/show_data.php" to
<td width="80%" class='title'><pre><?php echo htmlspecialchars($row_data->$table_field); ?></pre></td>

Is there any better way to do it?

Edward
GreyHead 25 Oct, 2013
Hi Edward,

Try running it through nl2br first - this post may help.

Bob
edwardfung1234 29 Oct, 2013
I added the nl2br() in my custom code.
But I found that since there is a htmlspecialchars() in show_data.php, the <br> tags generated by nl2br() are not displayed as html tags.
This topic is locked and no more replies can be posted.