I see this pattern used very often!
- Click on a link
- popup appears with a form
- fill in form and submit
- popup closes and main page populates itself with the form’s data.
Any idea how this works?
Edit:
by popup I mean an actual window popup, rather than a modal window. A modal window could work nicely though I reckon.
The only way to do this is with Javascript. Django’s own admin includes a (fairly clunky) example: when you save the popup, it returns a response consisting of just a
<script>tag containing Javascript which references the box in the parent form. See for exampledjango.contrib.admin.options.ModelAdmin.response_add.