Page 1 of 1

formatting being lost [SOLVED]

Posted: Tue May 19, 2009 11:35 am
by rlparker25
Hi,

I am building a module where the user registers, completes a form and can then return to edit the information, print it out, etc

When a user goes back into the form the text boxes show the content in the correct format i.e. with spaces and line breaks where the user originally put them. However on the preview page The formatting is lost and each answer is written as one big paragraph.

Is there anyway I can get it to keep the formatting when I output the text on the preview page? If I look in the database the spacing is correct but there are no line breaks just white space.

Is it possible for me to make the text areas on my form use a WYSIWYG editor? I was wondering if this would help keep the formatting as it may save the correct html tags into the database?

Hope that makes sense!

Rachael

[edit]

when I outputted the text on the preview page I needed to use nl2br() which kept the formatting

[/edit]