1👍
✅
If you are trying to do this in Django without any JS you will have to let the form submit. And load a second form.
I’m not sure if you’re using Class Based Views or functional views but regardless, your logic should be:
- Form 1: Have user select role (i.e. front end, back end, etc, ..) and press submit (post the form)
- When you process this form in your django view, take the selected choice (front end, back end, etc) and do a query for the relevant languages and use that queryset/choices as the choices for the languages form input and redirect the view to this form (Form 2).
I don’t know why you don’t want javascript but you can look at this link (and many others out there) on dynamic forms
Note: Since I don’t see any code I can only suggest you take this direction, guessing you’d do it the way I would given you restraints..
Source:stackexchange.com