Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions experimental/gppa-click-image-choice-image-wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Gravity Wiz // GP Populate Anything // Trigger GPPA update on Image Choice Wrapper Click.
* http://gravitywiz.com/documentation/gravity-forms-populate-anything
*
* Instructions:
* 1. Install our free Custom Javascript for Gravity Forms plugin.
* Download the plugin here: https://gravitywiz.com/gravity-forms-code-chest/
* 2. Copy and paste the snippet into the editor of the Custom Javascript for Gravity Forms plugin.
*/
// If Image Choice's Image Wrapper is clicked, make sure to trigger the `change.gppa` event.
window.gform.addAction(
'gform_input_change',
(elem , formId, fieldId) => {
if (
!$(elem)
.parent()
.hasClass('gfield-image-choice-wrapper-inner')
) {
return;
}
$(elem).trigger('change.gppa');
}
);
Loading