Opened 16 years ago
Closed 15 years ago
#9110 closed (duplicate)
prepopulate_from only works for text entry fields
Reported by: | Josh Ourisman | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | admin prepopulate | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
With the current implementation, prepopulate_from only works when the fields being drawn from are basic textentry fields: it can't handle choice fields such as ForeignKeys, &c. The attached patch changes this so that if the field specified to prepopulate from is any sort of choice field it will use onchange instead of onkeyup to monitor the field, and will retrieve the text of the field to get the selected option rather than the value which would return the wrong thing.
Attachments (1)
Change History (3)
by , 16 years ago
Attachment: | prepopulated_fields_js.diff added |
---|
comment:1 by , 16 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This is actually a straight-up duplicate of #9983.