In my current ZF2 project, I have a complex Form with several levels of nested Fieldset s that reflect the structure of objects to save in the background. Currently, data is sent directly to the Controller and stored in the database, if valid.
Now you need to perform an intermediate step: the user should be able to verify the input data before saving it in the database. If he decides that he is correct, the form data should be submitted and stored in the database; if the user decides that the form should be edited, he should be able to return to the form and correct it. (Of course, all this is in a loop until the user is satisfied with the form and submits it.)
This means that a preview page is needed. This page / action should receive data and display it somehow (in the form of a table or the same). Data needs to be temporarily stored and be prepared to βwetβ the Form object and save. If the user wants to update the form, the form must be restored.
How can I implement this requirement?
UPDATE
I am looking for a server solution. The preview should be a new page, not an HTML version of the JavScript / client side on the same page (for tracking and other purposes).
source share