Hi, I currently have a season_start and season_end in a form and it works.
season_start = forms.ModelChoiceField(
label='Season start',
required=False,
queryset=SeasonMaster.objects.all(),
widget=forms.Select(
attrs={
'class': 'form-control w-25',
},
),
)
season_end = forms.ModelChoiceField(
label='Season end',
required=False,
queryset=SeasonMaster.objects.all(),
widget=forms.Select(
attrs={
'class': 'form-control w-25 add-tilde',
},
),
)
But I would like them to be displayed side by side. However, when I tried putting them together as such nothing is showing from the drop down values.
season = forms.ModelChoiceField(
label='Season',
required=False,
queryset=None,
widget=forms.MultiWidget(
widgets=(
forms.Select(
attrs={
'class': 'form-control w-25',
},
),
forms.Select(
attrs={
'class': 'form-control w-25 add-tilde',
},
),
),
),
)
Any idea on what I should do? Thanks!