Close Nested Form modal when ESC key is pressed or when clicked outside modal
Instructions
- Install this snippet with our free Custom JavaScript plugin. https://gravitywiz.com/gravity-forms-code-chest/
- Also add “Load Init Scripts Early” snippet to your theme’s functions.php. https://github.com/gravitywiz/snippet-library/blob/master/experimental/gfjs-early-init-scripts.php
Code
Filename: gpnf-close-modal-on-esc-or-outside-click.js