I have written a form using the form API, and I want the user to preview the form before submission. How can this be accomplished?
closed as too broad by kiamlaluno♦ Nov 6 at 14:36
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Effectively this is a multistep form. Display the form showing a "Preview" button. On submit save something to the session or $form_state and redisplay the form. If the value has been set in the session show a "Submit" button. On this submit you can save the form values to the database and clear whatever flag value you had in the database.