Auto carriage return

fredfitaire 07 Nov, 2013
Hi,

With chronoforms V4 and a "Text area" element, if one user is typing a long text, when he reaches the right margin of the text area, an automatic carriage return is done that places the cursor at the beginning of a new line.
But in fact, this carriage return is for display purposes only, but not registered in the associated entry of the database. Thus, if my user forgets to do a manual carriage return at the end of the line, that becomes a long line within the DB. This would lead in display issues when I would retrieve this data and display it in a spreadsheet.
Is there a way to do an auto carriage return in the DB at the same time than in the display ?

Thanks😉
GreyHead 07 Nov, 2013
Hi fredfitaire,

Not that I know of. Text in a textarea only has the characters that are actually typed so unless the user adds a return it's all on one line. The folding is entirely managed by the browser - and it will change if you drag the textarea to change it's size.

The easiest answer is probably to enable Text Wrapping for that column in the spreadsheet.

Or, alternatively you could add some PHP after the form is submitted to chop the text up and add carriage returns but I suspect that would either be pretty complex or give messy results.

Bob
This topic is locked and no more replies can be posted.