Django: 5.1.1
bootstrap 5.3.3
python: 3.12.4
Bootstrap support says not there issue, must be Django.
Problem:
Trying to use choiceField from forms.py in bootstrap 5 form-select. I can only get it to work when using the html as seen below in ‘html page’. What happens is at the end of the select dropdown box there are 2 chars that are printed double quotes and gt i.e.: "> as seen in .png attached
NOTE; All other bootstrap components work as intended.
![]()
‘’’
html page (partial)
<div class="input-group input-group-sm mb-3">
<label class="input-group-text" for="entrytype">Entry Type:**</label>
<select class="form-select" id="entrytype" name="entrytype">
<option selected>Choose...</option>
<option value="{{ form.entrytype }}"></option>
</select>
</div>
‘’’
‘’’
forms.py (partial)
entrytype = forms.ChoiceField(choices=[[1, ‘Control_M’],[2, ‘SolarWinds’],[3, ‘FYI’],[4, ‘Other’],[5, ‘Adhoc’]],
widget = forms.Select(attrs={‘class’: ‘form-control’}))
‘’’