Replies: 2 comments 1 reply
-
Hi @rez0n, Thanks for reaching out. I believe you're looking for dependent_fields. However, in your use-case you will need to overwrite I hope those pointers help. If you need an example, let me know. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Actually I managed to do this in next way I have overwritten django_select2.js for a particular view in a way to create list of already selected id's for a field
This way
I'd already had a similar task to overwrite django_select2.js to get the dependent field in FormSet, this one is a bit different because it may return list of selected values instead single value. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have a dialog where user should pick other users to belong to some group with additional parameters.
I implemented ModelFormSet to render multiple rows with user selection using django-select2, there should be limitation to avoid selecting the same user twice, I implemented customized clean method for the formset and it works fine, but I need to improve this to make unable selecting the user which is already selected in another select2 field.
Any recommendations to approach for this?
Much thanks!
Beta Was this translation helpful? Give feedback.
All reactions