1

I'd like to put a search icon (like magnifiying glass) beside a field in the admin change form to let the users to trigger a script to fill other fields on demand only. I have to avoid triggering any field event (blur, click, change etc) on this field because it has to be triggered under users request, according to their needs.

Django has its own magnifying glass icon/link for raw_field foreign key selection popup. Is it possibble to do something similar, where I would trigger the script upon the magnifying glass click. It will be just a JQuery to call a webservice and return values to be filled up on some other fields.

I found one working solution by putting a custom button as a field, but it is placed far from the field because its label (what seems weird for my purpose).

Let me know if this description is enough or additional information is needed.

example here

Tks.

4

0 回答 0