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

Prepopulate when there's already a default? #1

Open
dannyadair opened this issue Oct 1, 2011 · 1 comment
Open

Prepopulate when there's already a default? #1

dannyadair opened this issue Oct 1, 2011 · 1 comment

Comments

@dannyadair
Copy link

Hi,
thanks for flexselect! It's definitely the cleanest solution to django admin chained selects around.

If I give the triggering field an initial value then I currently have to do a Javascript call to change() manually.
Would be great if the trigger fields were checked for an existing value and triggered initially if there was any.

Cheers,
Danny

@dannyadair
Copy link
Author

Example:
Taking the flexselect example model, this problem occurs when "company_contact_person" is not a required field. Then you can set the "Company", leave "Company contact person" blank, and next time you visit the "Case", the "Company contact person" won't be filtered by the company that is already selected.

class Case(m.Model):
    client = m.ForeignKey(Client)
    company_contact_person = m.ForeignKey(CompanyContactPerson, null=True, blank=True)

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

1 participant