Created
April 23, 2020 03:19
-
-
Save claygriffiths/dc01f07c8ddd3cc1eddbd13f07b7c3f8 to your computer and use it in GitHub Desktop.
GP Populate Anything: Conditionally Disable Dynamic Population and Live Merge Tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Gravity Perks // GP Populate Anything // Conditionally Disable Dynamic Population and Live Merge Tags | |
https://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
Instructions: | |
1. Add an HTML field to your form. | |
2. Copy and paste the entire contents of this snippet into the "Content" field setting. | |
3. Change the value of window.disableGPPA to enable/disable dynamic population. | |
--> | |
<script> | |
window.gform.addFilter('gppa_batch_field_html_ajax_data', function(data) { | |
if (!window.disableGPPA) { | |
return data; | |
} | |
data['field-ids'] = []; | |
data['merge-tags'] = []; | |
return data; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment