====================================== JavaScript customizations in the admin ====================================== .. _admin-javascript-inline-form-events: Inline form events ================== .. versionadded:: 1.9 You may want to execute some JavaScript when an inline form is added or removed in the admin change form. The ``formset:added`` and ``formset:removed`` jQuery events allow this. The event handler is passed three arguments: * ``event`` is the ``jQuery`` event. * ``$row`` is the newly added (or removed) row. * ``formsetName`` is the formset the row belongs to. The event is fired using the :ref:`django.jQuery namespace `. In your custom ``change_form.html`` template, extend the ``admin_change_form_document_ready`` block and add the event listener code: .. code-block:: html+django {% extends 'admin/change_form.html' %} {% load static %} {% block admin_change_form_document_ready %} {{ block.super }}