0

Im trying to figure out how to remove bullets from Django's MultipleChoiceField. So far I have tried this very popular solution by changing my css file that basically states to input this code in my css file

ul {
  list-style-type: none;
}

This didnt work and I also tried:

li {
  list-style-type: none;
}

This also didnt work. Is there something Django specific why the list keeps on showing up with bulletpoints? I also tried adding the style in my forms class but also without success

class SearchForm(forms.Form):
    job_industry = forms.MultipleChoiceField(
        widget=forms.CheckboxSelectMultiple(attrs={'class': 'form-check', 'style': 'list-style:none;'}),
        choices=industry,
    )

I noticed that whatever attrs I enter to the forms.CheckboxSelectMultiple it only gets passed to the <label> tag and not the <ul> or <li> tag of the list. Im using Bootstrap5 if that makes any difference. How to delete bulletpoints from Django forms.MultipleChoiceField?

d1spstack
  • 930
  • 1
  • 5
  • 16

1 Answers1

0

The problem turned out to be because of cache. Previously I set up memcache and had set the 'TIMEOUT': None Thats the reason why changing the css didnt have no effect

d1spstack
  • 930
  • 1
  • 5
  • 16