How to show Preview of a form before submitting ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

How to show Preview of a form before submitting ??

i have created a form and now i want to show the preview of the form to the user before saving the value in the database so i need to show a preview of the form to the user. Please tell me how to do this?

22nd Oct 2017, 11:09 AM
Muhammad Idrees
Muhammad Idrees - avatar
4 Answers
+ 3
form using post action to edit page
22nd Oct 2017, 1:00 PM
林偉雄
林偉雄 - avatar
+ 2
If there is some thing wrong in the input and user want to edit that content the how i return back to the original form with that values?
22nd Oct 2017, 12:46 PM
Muhammad Idrees
Muhammad Idrees - avatar
+ 1
using post in form , after click preview using $_POST to get your data in preview page and load input data in previous form.
22nd Oct 2017, 11:15 AM
林偉雄
林偉雄 - avatar
0
If you want to preview the form Data before submitting Then use Ajax Function to get all the Post Data from POST method and Pass it on to Dom element (HTML) Id then show and hide the preview Wrapper from Jquery Function That it!.
27th Oct 2017, 6:02 PM
Mahfooz Ahmed
Mahfooz Ahmed - avatar