Skip to content

integration with standard jquery.formset.js - solved #202

@witchnick

Description

@witchnick

Gentlemen,
it's been a few months since @rizumu add some code responsible for formsets and I believe this field is well known for many users.
I would like to use jquery.formset.js code instead of jquery.superformset.js because i do not want to use "empty_forms". As I understand in "added" function I should use "window.django_select2" plugin in JS to add div "select2-container". It's a shame but I do not know how to do it :(. Can someone provide some life example? Unfortunately there is no example in testapp provided with django-select2.

EDIT: I found how to proceed with this, so my Issue is solved. JS code responsible for using window.django_select2 is provided with every select2 field. Standard jquery.formset.js script is just cloning the code but it doesn't change the ID of the field in it. I have made the script changing this ID and everything works perfect.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions