On Sun, 2007-10-14 at 15:18 -0700, Greg wrote:
> Hello,
> I have a submission form.  When the form gets submitted I need to
> check to see if the b_state form variable is set to 'KS'. If so, then
> I need to let the user know that a sales tax will be applied to their
> order.  If they agree with the price increase then they can select
> 'Submit' again and the order will be processed.

[... code snipped ...]

> As you can see I have problems.  Is there anyway that I can do this
> without creating a session variable?  The only reason I have the
> session variable is to know if the user has already seen the price
> update.  That is how I know that I can go ahead and process the order.

You're wanting to pass information between two forms. So you have two
choices: either put the information in the session, or use a hidden
field (or fields) in the form to pass the information.

The advantage of using hidden fields in the form is that the processing
flow is fairly uniform. The only thing to watch out for (and it's
probably a non-issue in this use-case) is that the user can change the
hidden field's value, so you can't trust the result. For an indicative
thing, who cares? If the info is important, you'd have to encrypt it on
before including it so that you can detect tampering.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to