Opened 13 years ago

Closed 11 years ago

#562 closed defect (wontfix)

"Add another" JavaScript doesn't add new value to all fields relating to the same type

Reported by: Esaj Owned by: nobody
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Suppose we have a model containing two fields:

class Foo(meta.Model):
    field1 = meta.ForeignKey(Bar)
    field2 = meta.ForeignKey(Bar)

The admin interface generates "Add another" links next to the dropdowns. If the link next to field1 is clicked, and a new value is added, then the new value only appears in the field1 dropdown and not in the dropdown for field2.

This is also seen in "Add another" links next to edit_line fields.

Change History (3)

comment:1 Changed 13 years ago by Esaj

This is a bit tricky to do because there is no info in the HTML form about which fields relate to the same type. Could this be fixed by generating some JavaScript data and using that perhaps?

comment:2 Changed 11 years ago by Chris Beaven

Triage Stage: UnreviewedAccepted

comment:3 Changed 11 years ago by James Bennett

Resolution: wontfix
Status: newclosed

Marking wontfix because there really isn't a workable solution here; the admin would have to sprout all sorts of AJAX querying and re-querying to try to ensure that all choice lists stay up-to-date, and that just wouldn't be practical. Reopen if you have a specific solution in mind which doesn't have this sort of pitfall.

Note: See TracTickets for help on using tickets.
Back to Top