I've been investigating the localflavor mod and I'm wondering how to
apply it to my situation, or at least learn *if* it can be applied.

A simplified example would be I need a user to enter an address.  The
user could be from any number of countries so I want the form to to
able to validate, say, their postal code based on which country they
choose.  Localflavor will handle this validation for the countries I
need but the trouble is that localflavor requires the fields to be
defined in the form before rendering, which I obviously won't know
until the user has selected the country on the form.

So, my question is what is the best practice to handle this?  I'd
rather not have an initial one question form--"what country are you
from?"--that will be used to pick the proper address entry form if
possible.  Javascript is the way a lot of other address entry forms
adjust their look/validation but I would like to have Django doing the
server-side.  Should javascript be used to evaluate the country box
and then load in the necessary elements into the form?  Is there a
better more Django-based solution to this problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to