Replies: 1 comment
-
Hi there 👋, Thanks for reaching out. This change doesn't require a data-attribute. You just need to set class MultipleChoiceQuestionForm(forms.ModelForm):
class Meta:
model = MultipleChoiceQuestion
fields = ("question_text", "possible_answers")
widgets = {
"possible_answers": s2forms.Select2Widget(
attrs={
"data-width": "100%",
"class": "gs-input",
}
),
} I hope my answer is useful. Don't hesitate to ask more questions. Best |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The documentation says
I want to use the Select 2 option
selectionCssClass
. The code that I have isand it creates the following HTML
The CSS class that I provided,
gs-input
, is not present in the HTML. What am I missing?Beta Was this translation helpful? Give feedback.
All reactions