Keep form variables between pages and "Flash scope"

Hi all,

I am a beginner at Yii. I wonder if there is a best practice in saving form variables between pages, for those multi-page form scenario. I know one way is to store them in session, but wonder if Yii has provided a better way w/o using session.

Moreover, does Yii have something equivalent to the "Flash scope" as in Ruby on Rails or Grail?

Thanks.

  • Patrick

Yes, there is flash scope but flash scope is not suitable to hold form state because it’s cleaned up when you’re getting it.

Most probably the following will help you: http://www.yiiframework.com/extension/wizard-behavior

Or if all you need is to save some attributes to session, check out this extension, too:

http://www.yiiframework.com/extension/defaultpersister