views:

78

answers:

2

hello

how to implement a previous button on form, when users click on it , they can back to previous page?

thanks

+1  A: 

What about using javascript? Something like:

<a href="javascript:history.back();>Back</a>
Enrico Carlesso
I guess user refers to "previous step in form" rather than "previous page" - and if so, using history.back() might not be a good option.
Victor Farazdagi
Maybe you're right, but I cannot find any other interpretation of "previous page"
Enrico Carlesso
A: 

Well, there's no out-of-box support for multi-step forms in ZF, you can come with your own implementation easily of course - generally Zend_Form_SubForm and sessions are used. Then it is up to you as developer how to implement back button - whether it's a normal button which serves as flag for the sub-form processing code, or javascript.

Since multi-step form is something many developers needed, there are tons of resources on how to do it. Google, and you'll see for yourself. Just to name a few:

Victor Farazdagi