Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add class Formset(Forward) #1313

Open
bernd-wechner opened this issue Nov 7, 2022 · 1 comment
Open

Add class Formset(Forward) #1313

bernd-wechner opened this issue Nov 7, 2022 · 1 comment

Comments

@bernd-wechner
Copy link
Contributor

bernd-wechner commented Nov 7, 2022

We have Self(Forward) which forwards the field's own value.

But this is django-autocomplete-light and Django supports Formsets.

In a Formset, there's a field naming convention (on the id and name attributes) that is roughly form-n-field where form is the name of the form and field the name of the field and n the form number in the set (0, 1, 2, 3, ...).

Formset(Forward) would collect all the values of that field in the formset and submit them as a list.
The server side can then use this list conveniently as an exclusion list to prevent, for example, any two forms in the formset having the same selection.

bernd-wechner added a commit to bernd-wechner/CoGs that referenced this issue Nov 7, 2022
As in, properly separated the reusable code from the site specific code to support formset exclusions. Adding this issue to DAL:

yourlabs/django-autocomplete-light#1313

in the hope of seeing better built-in support there some time.
@jpic
Copy link
Member

jpic commented May 3, 2023

Sure, let's see what a patch looks like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants