Support for Consent Field Description

Code

Filename: gppa-consent-field.php

<?php
/**
 * Gravity Perks // Populate Anything // Support for Consent Field Description
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 */
add_filter( 'gform_entry_field_value', function( $display_value, $field, $entry, $form ) {
	if ( $field->type === 'consent' ) {
		$display_value = gp_populate_anything()->live_merge_tags->replace_live_merge_tags_static( $display_value, $form, $entry );
	}
	return $display_value;
}, 10, 4 );

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.