Strip Tags from Populated Value

Code

Filename: gppa-strip-tags.php

<?php
/**
 * Gravity Perks // Populate Anything // Strip Tags from Populated Value
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 */
add_filter( 'gppa_process_template_value', function( $template_value, $field ) {

	// Update "123" to your form ID and "4" to your field ID.
	if ( $field->formId == 123 and $field->id == 4 ) {
		$template_value = strip_tags( $template_value );
	}

	return $template_value;
}, 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.