HI
I want to align the radio buttons horizontally. By default django forms displays in vertical format.
feature_type = forms.TypedChoiceField(choices =
I've come up with an alternative solution. If you are using bootstrap to render your forms, you can add the .form-check-inline class to the input and the field will display horizontally. Listed below is code that shows what I'm describing. I hope this helps someone from reinventing the wheel. Thanks for reading. Take care and have a good day.
feature_type = forms.MultipleChoiceField(
required=False,
...
widget=forms.CheckboxSelectMultiple(attrs={'class': 'form-check-inline'})
)