On Sun, Jul 25, 2010 at 1:32 PM, Tomfox Wiranata
<tomfox.wiran...@gmail.com> wrote:
> hi,
>
> this is what a user can do on my website: it is close to ebay. he can
> enter various information like title, description, pictures etc. about
> a product. as i want this to be web 2.0 compatible i'd like to do
> this.
>
> when the user entered all information he has the opportunity to get a
> preview, how the site would look like.
>
> my questions:
>
> a) where do i cache the information before they get stored in my
> database? in my session? hidden fields? somewhere else?
>
> cause when the preview is called the information need to be retreived
> from the "caching", cause it is not yet in the database......

You could create a form with hidden elements along with the preview.
Then this second form will submit the data again. IOW, when the User
is first choosing title, etc. that form submits to your preview
action. Do what you need to do there but also set() the submitted data
so that you can build the hidden form in the preview view. This second
form would submit to some other action, which would save the data to
the DB.

You could also have another submit button that would persist the data
to the session instead so that the User can continue ... doing
whatever the User is doing. A shopping cart pattern, basically.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to