Monday, July 27, 2009

data SAVE when clicking back button - (wizard component)

Hi, anybody has tried saving data when going back in the wizard
component?

Wizard is working nice and is keeping data when going forward. I need
to save data when clicking the back button. Anybody knows how?

Imagine you put some data on STEP2 but you have not continued yet. you
go back to STEP1 and then to STEP2 and data from STEP2 were not saved
- naturally - you did not clicked continue to STEP3 yet.


so ...


I have added ONE line of code... it working ALMOST perfectly, but it
tells me not valid step ERROR in case I am returning from the LAST
step!
......
} elseif (isset($this->controller->params['form']['Previous']) && prev
($this->steps)) {
this->save();//MODIFIED - added ... performs save of data when going
to back-step
......
It only happens on last step. maybe it has something to do with array
pointers. Anybody tried that solution??

Thanks
Tomas


Component:
http://bakery.cakephp.org/articles/view/wizard-component-1-2-1
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: