I have a Choice Field that when changed to another value it must change other fields in the form.
So I need to refresh the form, or update in place the fields with a ajax call. Is this possible with the admin forms?
I have a Choice Field that when changed to another value it must change other fields in the form.
So I need to refresh the form, or update in place the fields with a ajax call. Is this possible with the admin forms?
Its definitely possible to have dynamic fields in django admin using javascript.
For a good example, I would suggest
django-smart-selects
anddjango-admin-flexselect
.https://github.com/digi604/django-smart-selects
https://github.com/runekaagaard/django-admin-flexselect
Came across this question a while back. Here's how I ended up solving it, with an example that filters
Buildings
down toFloors
down toRooms
(Django 2.0.3):