Hi
A very urgent question...
I have several Long Free Text fields containing newline/new paragraphs which I cannot convert to a single line using javascript:
var lorem='{LFTextItem.shown}';
Have tried several regex variants like
var lorem='{LFTextItem.shown}'.replace('/\r?\n/g', ' ');
I use splitTextToSize in jsPDF to print several lines of text in a pdf. It requires a single string input.
The script fails as soon as a Free Text field contains any new line characters.
Should I treat the item as a multidimensional array? If I look at the survey reply in the administrator interface, new line characters are automatically removed. How can I obtain the same effect in my javascript?
Can I use a REGEX inside the configuration of the item in Limesurvey to bypass these issues?
/statman13