Multipart forms
Posted: Mon Aug 14, 2006 4:21 am
Hi,
Here's a question to those who take the OO approach in PHP5.
I'm trying to implement a form with multiple parts.
The user fills in one part then clicks 'next'.
The user fills in the next part then clicks 'next' and so on until they reach the last part.
When they have filled that in, they click submit and the data is used to retrieve data from the database or used as input to the database.
How would you recommend applying the MVC pattern to this application or is this the wrong approach?
An initial idea is to have one view class for the whole form (every step). When one part is posted, the part is posted and the controller uses this value to work out which part to show next (after checking that the previous parts were filled in properly). What are everyone's thoughts on this?
Thanks for any feedback.
Here's a question to those who take the OO approach in PHP5.
I'm trying to implement a form with multiple parts.
The user fills in one part then clicks 'next'.
The user fills in the next part then clicks 'next' and so on until they reach the last part.
When they have filled that in, they click submit and the data is used to retrieve data from the database or used as input to the database.
How would you recommend applying the MVC pattern to this application or is this the wrong approach?
An initial idea is to have one view class for the whole form (every step). When one part is posted, the part is posted and the controller uses this value to work out which part to show next (after checking that the previous parts were filled in properly). What are everyone's thoughts on this?
Thanks for any feedback.