Hi
I have a big problem so I'll be as thorough as I can with my explanation.
I have a multi page form (3 pages) First page all text boxes, Second page mainly text areas, Third page shows all information entered in the First and Second pages for the customer to review.
If they need to go back and change anything there is a button linking back to the First or Second page so they can change a field then resubmit. Once happy they can send and finalize from the third page which goes to the thanks page.
So far so good and working, almost. In the Third page (review page) the details entered in all of the textareas which have had carriage returns used shows the horrible \r\n characters instead! this is the code used to display the session data from one of those text areas - Key Services (this is just to display the info for review its not an editable field)
When I go back to the Second page to edit the info the same \r\n characters are displayed in the text area input field as well, the code for the field - Key Services
Points worth noting: If I fill in the form through to the third page (review page) and go into the database the un-finalized data shows in the database as it should, line breaks between paragraphs or anywhere where the return key has been used. If I go back and edit the second page where it is now displaying the \r\n characters and resubmit the page without removing the \r\n characters they will now be shown in the database as if they had been typed in, each time this is done extra \ seem to appear as well.
Also worth pointing out, if filling out the page and it is submitted without a required field the server side validation lists whats needed, refilling the completed fields correctly, the problem only occurs once the form is filled in correctly and moves on to the next page.
Being a beginner to PHP (I'm trying to learn) I may be missing something very simple but I have followed all of the tutorials to create a multi page form.
Its as if the data is being sent to the database correctly but when it is needed to be displayed again in the form pages it goes wrong.
Please help as I need to crack this, I've spent hours and hours day and night trying to solve it.
PS. I really love form tools.
Many many thanks
Steven
I have a big problem so I'll be as thorough as I can with my explanation.
I have a multi page form (3 pages) First page all text boxes, Second page mainly text areas, Third page shows all information entered in the First and Second pages for the customer to review.
If they need to go back and change anything there is a button linking back to the First or Second page so they can change a field then resubmit. Once happy they can send and finalize from the third page which goes to the thanks page.
So far so good and working, almost. In the Third page (review page) the details entered in all of the textareas which have had carriage returns used shows the horrible \r\n characters instead! this is the code used to display the session data from one of those text areas - Key Services (this is just to display the info for review its not an editable field)
Code:
<div class="spacer"><span>Key Services</strong></span><br>
<span class="lightgray"><?=@$fields["key_services"]?></span></div>
When I go back to the Second page to edit the info the same \r\n characters are displayed in the text area input field as well, the code for the field - Key Services
Code:
<textarea class="spacersml span12" rows="8" name="key_services" placeholder="Key Features and Services Details Here…"><?=@$fields["key_services"]?></textarea>
Points worth noting: If I fill in the form through to the third page (review page) and go into the database the un-finalized data shows in the database as it should, line breaks between paragraphs or anywhere where the return key has been used. If I go back and edit the second page where it is now displaying the \r\n characters and resubmit the page without removing the \r\n characters they will now be shown in the database as if they had been typed in, each time this is done extra \ seem to appear as well.
Also worth pointing out, if filling out the page and it is submitted without a required field the server side validation lists whats needed, refilling the completed fields correctly, the problem only occurs once the form is filled in correctly and moves on to the next page.
Being a beginner to PHP (I'm trying to learn) I may be missing something very simple but I have followed all of the tutorials to create a multi page form.
Its as if the data is being sent to the database correctly but when it is needed to be displayed again in the form pages it goes wrong.
Please help as I need to crack this, I've spent hours and hours day and night trying to solve it.
PS. I really love form tools.
Many many thanks
Steven