I am using a simple form in modx CMS and I need the textarea to retain the line breaks.
I'd prefer a javascript solution if possible.
This is because the textarea will be used to order food and the client doesn't want to receive a single line of text.
eg, this entry:
1 can coke
3 beef sandwiches
1 cake
is received as:
1 can coke 3 beef sandwiches 1 cake
...
Search Result
Collapse
3 results in 0.0030 seconds.
Keywords
Members
Tags
-
How to retain line breaks from a textarea in a simple form
Last edited by Niheel; Sep 23 '10, 03:35 PM. -
Remove line breaks from a BIG text file
I need to remove line breaks from a large ASCII table, but get a MemoryError. The data is an ASCII grid: the header takes up the first 6 lines followed by 22000 rows of data. I want to remove the line breaks from the table part of the file while leaving the first 6 line breaks. The following code works for small files but runs out of memory (at the 3rd line) for large files: (thanks to Zhaphod and Bvdet from an earlier post)
Code:f1 = open(fn1)
-
Remove line breaks from a text file
I have an ASCII table where each row is a line. I'd like to replace each line break with a space so that i end up with one very long row. Any ideas? Thanks!