I have one question on the multiline display:
The paragraph inserted into the text area showed quite well in the table cell in multiline format.
However, in the DB, it is actually preserved in string without line.
How to display it in multiline form in the custom page? I have been trying to add css for the custom page as follow, but it didn't work out:
###
.multiline {
white-space: pre-wrap;
}
<div class="multiline">
A multiline text
for demo purpose
</div>
Multiline text in table cell (custom page)
Re: Multiline text in table cell (custom page)
Hi,
could you post some screenshots? And: How do you know how the string is saved in the database? If you displayed the DB contents in the browser there is already interference (as the browser takes some form of representation of that string).
Olaf
could you post some screenshots? And: How do you know how the string is saved in the database? If you displayed the DB contents in the browser there is already interference (as the browser takes some form of representation of that string).
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Multiline text in table cell (custom page)
The representation of the content in table cell:
1) text-area
line 1
line 2
line 3
line 4
2) DB
line 1
line 2
line 3
line 4
3) Save CSV
line 1 line 2 line 3 line 4
4) In custom page
line 1 line 2 line 3 line 4
How to make the representation of text in multiline format as shown in (1) and (2) for (3) and (4)?
Regards,
Stephen
1) text-area
line 1
line 2
line 3
line 4
2) DB
line 1
line 2
line 3
line 4
3) Save CSV
line 1 line 2 line 3 line 4
4) In custom page
line 1 line 2 line 3 line 4
How to make the representation of text in multiline format as shown in (1) and (2) for (3) and (4)?
Regards,
Stephen
Re: Multiline text in table cell (custom page)
Hi Stephen,
just a try: Maybe take a look at the nl2br function of PHP and run the data through this before using it in a custom page. CSV ... let's do this once your custom page works. See:
https://www.php.net/manual/en/function.nl2br.php
https://www.w3schools.com/PHP/func_string_nl2br.asp
Olaf
just a try: Maybe take a look at the nl2br function of PHP and run the data through this before using it in a custom page. CSV ... let's do this once your custom page works. See:
https://www.php.net/manual/en/function.nl2br.php
https://www.w3schools.com/PHP/func_string_nl2br.asp
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Multiline text in table cell (custom page)
Dear Olaf,
That will work only when the text have \n to indicate where to break the line.
However, the existing text do not have \n.
I wonder how the original table cell could show the representation of text with line-break.
That will work only when the text have \n to indicate where to break the line.
However, the existing text do not have \n.
I wonder how the original table cell could show the representation of text with line-break.
Re: Multiline text in table cell (custom page)
Hi,
I would suggest looking at your data with MySQL Workbench or some other tool which does not include the browser. If there are linebreaks somewhere, they must obviously be saved with the data.
Olaf
I would suggest looking at your data with MySQL Workbench or some other tool which does not include the browser. If there are linebreaks somewhere, they must obviously be saved with the data.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view