Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Creating Multi-Step Forms And Wizards In PHP

Article Comments (13 total)

Displaying article comments 1 to 10 of 13
TiTo, 18 September 2009

Thanks for nice code i am new here and i got error while i was doing as you say Warning: Invalid argument supplied for foreach() in C:\wamp\www\rege\CheckoutWizard.class.php on line 489 please help me thanks

Tom, 20 April 3118

Hello, I've spent the last week implementing this into my site and its great! By far the best explanation of multi step form that I've seen. The problem is that I dont fully understand classes and object oriented programming.. So I was wondering if you could get in contact about adding an upload file section onto this form. I would really really appreciate it. Thankyou so much! Tom

Jeff, 20 April 2189
Can you add a tutorial which shows how to add clickable links to each step that are only clickable if the previous step was completed? So if a user has completed steps 1-3, he can go back to step 1, make changes and click on the link for step 3. But have the links clickable only if the step has been completed. Maybe show all the links on all steps, but have the links to the next steps grayed out or non-clickable until the previous step(s) have been completed.

Gnarl, 18 January 2009
i have followed your article and managed to make a multy step wizzard Application for my website with success! but i have a problem : when it comes to the part that the wizzard shows the data entered so that user see them and confirm its correct i want to make it that when he press the finish button confirming the data is correct to post the data in my forum making automatic a new thread. exept modifying the button do i need to put something extra in checkoutwizard.class.php ? This is the button if you need more code tell me. isLastStep() ? 'Finish' : 'Next' ? >>" /

sanchoz, 12 December 2008
Help, How do you jump from lets say page 1 to page 3 and back Please help

Abdul, 21 September 2008
Great script, thanks, but how do I store the form submissions in a database i.e. if the form fields of step 2 depend on the value of the fields on the previous step, how do I know which db fields to insert data into?

Christina, 21 August 2008
Great article! My only question is how would you add a radio input?

Shila, 20 April 4366
Is it possible to POST the completed form to two locations (php files) on the same server. many thanks Shila

RJ, 20 April 3407
Form example doesn't seem to work properly when using Zerv, CheckoutWizard, and main php page. Please advise when fixed.

Kamy, 2 May 2008
I'm having difficulties in using this script with Radio buttons. I have: Daily Weekly Monthly and $System- $this - coalesce($form['System']); $this-setValue('System', $System); if (strlen($System) 0) $this-setValue('System', $System); else $this-addError('System', 'Please enter your sys'); but it does not recognize it when a button is selected! any ideas?
Submit a Comment
Use the following form to submit a comment for this article. You can include any required code snippets, which we will format and highlight accordingly.

Note: Before your comment appears on PhpRiot, it must be manually approved. The email address field is optional. If you choose to include it, it will be displayed obfuscated to protect it from spammers.

In This Article

Additional Files