How would you create a preview page?

Hello I am big fan of the course. Would like to know how to create a preview page. So when the user enters the order details , there is a preview page button which the user can click on ,It then shows the details of the order again (with and edit button) before entering their credit card info.So it would be /new then /new/preview. Cheers Neil

Posted over 5 years ago by neil
Posted over 5 years ago by Alex Yang

Glad you're enjoying the course, Neil! I haven't had to implement this myself, but I'd imagine two possible ways to go about it.

1. You could save the form parameters in a Preview database and display them on the page. Ideally, you would delete the Previews afterward.

2. Another way would be to set up the /new/preview route which will be able to take the form parameters and display them on the page directly, without saving it to any database. I'm not 100% sure about this approach, but if it works, it would save you from having to add another database.

How were you planning to implement this feature?

0
Posted over 5 years ago by neil

Hi Alex, I am doing an online job board. When businesses submit a new job listing (/new) , i want them to go to a preview (/new/preview) screen to make sure the details are correct before asking for credit card payments . The demo app is here http://analytics123.herokuapp.com/

0