Details page (select the no of tickets)
Review page (confirm total cost and tickets)
Payment page (enter personal and payment details)
I need to pass a custom model from the details page on to the next, is it possible to do it this way or would I have to use sessions/TempData to achieve this?
I've got the custom model working and have tried using partial views with the forms, i've also had a custom controller working but still struggle to pass the model between the pages.
Yes I pretty much have it working now using SurfaceControllers, but I ideally wanted the forms across 3 different URLs which I’ve been struggling to achieve and only seem to be able to pass the model to a partial view from the controller. But I guess this way will have to do.
Passing model data on through 3 pages
I have 3 pages for the user to book tickets:
Details page (select the no of tickets) Review page (confirm total cost and tickets) Payment page (enter personal and payment details)
I need to pass a custom model from the details page on to the next, is it possible to do it this way or would I have to use sessions/TempData to achieve this?
I've got the custom model working and have tried using partial views with the forms, i've also had a custom controller working but still struggle to pass the model between the pages.
Have you looked into SurfaceControllers? You should be able to persist data by posting a form through a surfacesontroller on each page.
https://our.umbraco.com/documentation/reference/routing/surface-controllers
Hi Ole
Thank you for your reply.
Yes I pretty much have it working now using SurfaceControllers, but I ideally wanted the forms across 3 different URLs which I’ve been struggling to achieve and only seem to be able to pass the model to a partial view from the controller. But I guess this way will have to do.
is working on a reply...