You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had the same issue, setting the choices list on the ChoiceField rather than on the Select widget solved the issue for me (though I cannot figure how to apply style to the created widget)
So your code would look something like this: category = forms.ChoiceField(choices=choice_list, widget=forms.Select(attrs={'class': 'form-select'}))
Hello,
I'am using this form class to populate an dropdown list. My problem the dropdown is empty
class LeadModelForm(forms.ModelForm):
class Meta:
model = InstaProfile
fields = fields = 'all'
choices = Category.objects.all().values_list('name','name')
choice_list = []
If a i remove the crispy filter on my html template file is working
Any idea ?
Thank you
Greg
The text was updated successfully, but these errors were encountered: