Hi I am new to Django and have a question about a form I have built.
The form I have created consists of one multiplechoicefield, with the choices being a dictionary of vacations.
interests = forms.MultipleChoiceField(required=False, widget=forms.CheckboxSelectMultiple, choices=vacations.items)
The dictionary has a string as a key (states), and a list of strings as values (cities in the state). Ideally, I am envisioning looping through the keys displaying one at a time, and if the user clicks on the key, then show the values for the key and let the user click on many options out of the values for that key.
Example: Loop through states as buttons, and if the user clicks on the state, display the cities as buttons and allow the user to select multiple cities in the state and proceed to next state. Proceed to next state in the “vacation” dictionary.
All help is really appreciated! Thank you!