Hello,

I have a page that must show data in one of the follow three ways.

A.  No choices:  Nothing to choose from.  Page will show nothing, or
probably a message saying something about there being nothing to
choose.

B.  1 Choice:  There is only 1 and you must choose it.  So, not much
of a choice here.  Just show the one thing to the user a plain text,
and don't show a choice menu at all.

c.  2 or more Choices: In this case there is a choice to be made, so
the user should see a menu to make a choice.

I'm not sure if I should roll my own solution, or use a ChoiceField.
I tried creating a ChoiceField in my form, and then not showing it in
cases A or B, rather emitting a <input type="hidden".  But, when I
validate I get errors saying that the "choice" isn't in the choices.

I'm wondering if making a custom widget is a possible solution.  But,
I don't want to do anything overly complicated if not necessary.

Any ideas?  I'm using 1.0 Django

thanks
gene

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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