Maybe the ChoiceField should just be a CharField that just uses the
Select widget class? That way it won't have choices hardcoded into the
field validation. Your clean method could check that the domain is
valid.

Alex
On Aug 16, 1:39 pm, ringemup <ringe...@gmail.com> wrote:
> I have a domain search form with two fields: a Textarea for inputting
> a list of domains to check, and a ChoiceField for selecting a domain
> based on suggestions.
>
> The ChoiceField is required, and on the first submission is auto-
> populated with suggestions based on the domains listed in the
> textarea.  Subsequently, the user may either enter a new list of
> domains to check, or select a domain from the radio buttons.
>
> However, when they select one of the radio buttons, the form never
> validates because the selected domain "is not one of the available
> choices" -- because, of course, the choices are populated only after
> the form is submitted.
>
> I'm having trouble working around this because of the messiness that
> is Django's FormWizard.  Any suggestions?
>
> Thanks!

-- 
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