1

I have made a form field with drop down list with various choices(lets say A,B,C,D). The next field in the form is dependent on the option selected in the drop down list. How can I autofill the next field if option A is selected with a fixed value and make it charfield when other options are selected?

Edit: I have to autofill only one value when the first option i.e. option A is selected. So when the user clicks on A, it autofills 'yo'. Otherwise, in case of options B,C,D, it gives the option to enter some random word.

uitwaa
  • 615
  • 1
  • 12
  • 24
  • Possible duplicate of [Django dependent select](https://stackoverflow.com/questions/25706639/django-dependent-select) – Lemayzeur Jun 10 '18 at 21:42
  • And also you can follow this [blog](https://simpleisbetterthancomplex.com/tutorial/2018/01/29/how-to-implement-dependent-or-chained-dropdown-list-with-django.html) – Lemayzeur Jun 10 '18 at 21:42

0 Answers0