Add Live Merge Tag to Whitelist

Code

Filename: gppa-lmt-whitelist.php

<?php
/**
 * Gravity Perks // Populate Anything // Add Live Merge Tag to Whitelist
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 */
add_filter( 'gppa_lmt_whitelist', function( $whitelist, $form ) {
	$merge_tag = '{ip}';

	$whitelist[ $merge_tag ] = wp_create_nonce( 'gppa-lmt-' . $form['id'] . '-' . $merge_tag );

	return $whitelist;
}, 10, 2 );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.