Some more details would be good, but off the top of my head, something like this might work:
def my_view(request): form = MyForm() form.fields['mychoice'].choices = ((1,'ABC'),(2,'XYZ')) I havent' been able to test this out, so make sure you do before you using it. You can of-course do any amount of pre-processing before you apply that tuple. Best, Rishabh On Mon, Jun 23, 2008 at 8:25 AM, Calvin Dodge <[EMAIL PROTECTED]> wrote: > > I've been tearing out what little hair I have left trying to figure > this out. > > How do I dynamically fill a ChoiceField by filtering on a value known > to the URLView? Every "dynamic fill" example I've found assumes the > form knows it all - I haven't seen anything which shows me how to pass > that value from the view to the form. > > Help? Please? > > Calvin Dodge > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---