File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Gravity Wiz // GP Populate Anything // Trigger GPPA update on Image Choice Wrapper Click.
3+ * http://gravitywiz.com/documentation/gravity-forms-populate-anything
4+ *
5+ * Instructions:
6+ * 1. Install our free Custom Javascript for Gravity Forms plugin.
7+ * Download the plugin here: https://gravitywiz.com/gravity-forms-code-chest/
8+ * 2. Copy and paste the snippet into the editor of the Custom Javascript for Gravity Forms plugin.
9+ */
10+ // If Image Choice's Image Wrapper is clicked, make sure to trigger the `change.gppa` event.
11+ window . gform . addAction (
12+ 'gform_input_change' ,
13+ ( elem , formId , fieldId ) => {
14+ if (
15+ ! $ ( elem )
16+ . parent ( )
17+ . hasClass ( 'gfield-image-choice-wrapper-inner' )
18+ ) {
19+ return ;
20+ }
21+ $ ( elem ) . trigger ( 'change.gppa' ) ;
22+ }
23+ ) ;
You can’t perform that action at this time.
0 commit comments