Replace Live Merge Tags Individually and Show Spinner

  1. Install this snippet with our free Custom JavaScript plugin. https://gravitywiz.com/gravity-forms-code-chest/

Code

Filename: gppa-replace-live-merge-tags-individually-and-show-spinner.js

/**
 * Gravity Perks // Populate Anything // Replace Live Merge Tags Individually and Show Spinner
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 *
 * 1. Install this snippet with our free Custom JavaScript plugin.
 *    https://gravitywiz.com/gravity-forms-code-chest/
 */
gform.addFilter( 'gppa_loading_target_meta', function( targetMeta, $elem, context ) {

	targetMeta[0] = $elem;
	targetMeta[1] = 'gppa-spinner';

	if( $elem.is( 'span' ) && $elem.data( 'gppa-live-merge-tag' ) ) {
		$elem.html( '' );
	}

	return targetMeta;
} );

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.