On Sun, 2007-10-14 at 16:24 -0700, Greg wrote:
> Malcolm,
> Can you please show me how I would use hidden fields to let me know
> that the user has seen the updated price?

There's a newforms widget called HiddenInput. So if your form has a
field called, say, "seen_updates", make sure you create it with
widget=HiddenInput. Then the field won't be rendered visibly on the
form, but you'll still get back the value from it when the form is
submitted.

So, on the first presentation of the form, seen_updates might be 0 (if
you're using an integer field for it) and then the second time around,
it will be 1. That way, your form processing code only has to check this
one form variable to see if it needs to represent the form with the
sales tax added.

Does that clear things up a bit?

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