I built a form in django and I’m having trouble debugging my Tours Choices. It is a ChoiceField and I use the CheckboxMultipleSelect Widget. I don’t know what I’m doing wrong to get the error in the screenshot below. Any thoughts? Do I need to facilitate more information? I’m a django newbie.
Share
A
form.ChoiceFieldlets you input exactly one choice for a form (out of a selection of several choices). If you saved it to a database in a model there would be one value stored in the database. YourCheckboxMultipleSelectwidget is for aform.MultipleChoiceFieldwhere you can input multiple values. So change yourChoiceFieldto aMultipleChoiceFieldin your form and you should be fine. If you save this data to a model, that model would have to be an appropriate field, like a ManyToManyField if they are Foreign Keys.