I have a Model with a ForeignKey and I'm using a vanilla ModelForm, so
it's using the standard ModelChoiceField widget. I'm looking to add a
'+' icon with a link to popup and new window to add a new foreign key
that is not already in the dropdown list. Yes, exactly like the admin
forms.

I've done it in the past by manually laying out the form in the
template (still with {{ field }} and {{ label }} values, just no
looping at all). I don't want to do this again.

I could append the link via javascript. But that's dirty.

I quickly took a stab at extending the ModelChoiceField, but I failed
and moved on.

Searching the web for a solution hasn't been good to me.


What's the easiest way to cleanly add this to a form and get it to
refresh the choices?

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