Use Standard Merge Tags in Choice/Value Templates

Code

Filename: gppa-merge-tags-in-templates.php

<?php
/**
 * Gravity Perks // Populate Anything // Use Standard Merge Tags in Choice/Value Templates
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 */
add_filter( 'gppa_process_template', function( $template_value, $field, $template, $populate, $object, $object_type, $objects ) {
	return GFCommon::replace_variables( $template_value, GFAPI::get_form( $object->form_id ), (array) $object );
}, 10, 7 );

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.