Skip to content

Instantly share code, notes, and snippets.

@claygriffiths
Created April 23, 2020 03:19
Show Gist options
  • Save claygriffiths/dc01f07c8ddd3cc1eddbd13f07b7c3f8 to your computer and use it in GitHub Desktop.
Save claygriffiths/dc01f07c8ddd3cc1eddbd13f07b7c3f8 to your computer and use it in GitHub Desktop.
GP Populate Anything: Conditionally Disable Dynamic Population and Live Merge Tags
<!--
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