File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Gravity Perks // Nested Forms // Relaunch Modal After Adding Child Entry
3+ * https://gravitywiz.com/documentation/gravity-forms-nested-forms/
4+ *
5+ * Instructions:
6+ *
7+ * 1. Install this snippet with our free Custom JavaScript plugin.
8+ * https://gravitywiz.com/gravity-forms-custom-javascript/
9+ * 2. This will automatically apply to all Nested Form fields for the parent form
10+ * on which it is installed.
11+ */
12+ var $addEntry ;
13+
14+ $ ( '#gform_GFFORMID' ) . find ( '.gpnf-add-entry' ) . on ( 'click' , function ( ) {
15+ $addEntry = $ ( this ) ;
16+ } ) ;
17+
18+ $ ( '#gform_GFFORMID' ) . on ( 'click' , '.gpnf-row-actions .edit-button' , function ( ) {
19+ $addEntry = null ;
20+ } ) ;
21+
22+ $ ( document ) . on ( 'gform_confirmation_loaded' , function ( event , formId ) {
23+ if ( $addEntry && formId == $addEntry . data ( 'nestedformid' ) ) {
24+ $addEntry . click ( ) ;
25+ }
26+ } ) ;
You can’t perform that action at this time.
0 commit comments