does anybody have an example of how to create a dynamical multipage form with Yii?
What I need is a form which is divided into multiple pages.
Based on the user’s answers in each step the options available in the next step should be determined.
Example:
In a shopping application the user can enter his address data and choose a payment method on page 1 and then proceed to page 2 of the form. On page 2 he has either to enter his credit card information or his bank account data, based on the payment method he has chosen in step 1.
If no example of such a "dynamic" mulipage form is available, maybe someone has an example of a static mupltipage form, so a single static form which is divided into multiple pages?
Hi, I have no example but a hint. You can create OrderForm model. In there you can define a scenario for each page. When the user submits for example page 1, you save the whole form in session and proceed to page 2. After the last page got submitted, you can access each scenario input from session for processing. Also it should be easy possible to implement a back-button so customer can recheck input.