I am using the ModelForm in django to create my form in django. So I have a appointment model which references the Location model. Because I am using ModelForm, the select box for the Location field is automatically populated by django itself. What I want is to control the type of location that is populated in the form creating using the ModelForm based upon attributes like say status.
I don't want to manually override the location field itself in the ModelForm. I want the elements to be handled by django itself. I just want to hook in a filter. Any suggestions?