Is there a way to use something like dynamic forms in Django? I don't mean something like django-dynamic-forms 0.5.1
where you can create forms in Admin.
Simple example:
So on the web page, I could choose, for example, state from drop down menu
and then, right next to this drop down menu
there would be another drop down menu
where I could choose city (based on the first drop down menu
).
The real problem:
In my project, there is a Translator
which can be able to translate many languages with 3 possible levels ( like Native, Intermediate ... ).
When customer want's to get something translated, they have to fill the CreationJobForm
- an here is a problem. It is possible that customer wants to translate some text into multiple languages - so he would just choose those languages.
But what if there is just one Translator
speaking Chineese on Basic level and customer wants professional level - according to this situation, I can't just create a form with drop down menu
- Language
and drop down menu
- Level
, because the customer could be able to choose professional
level which is not possible for us to translate.
So my point is that I would like to have a form in which customer could choose language and based on that language, he would be able to choose only those levels which are in our database. Then he could choose another language, then level etc.
Is it possible to make it work through Django forms?
Maybe, this approach would be simpler because you can prepare the form just once and you don't need to change the second drop down menu after filling the first.