Skip to content

formset issue with django-select2 #77

Answered by codingjoe
DarnelleF asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @DarnelleF,

Yes, there is an answer, this is actually a very common question. I was simply on vacation and didn't have time to catch up will all my work until now.

If you add new select inputs to the DOM you need to initialize them. We only initialize all select inputs a single time once the DOM is loaded. Everything you inject via JS afterwards, you will need to initialize yourself. Just look into the JS file to see how to initialize new Select2 fields.

Best
Joe

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@darnellefevrier
Comment options

Answer selected by codingjoe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #75 on August 08, 2021 08:09.