Skip to content

Commit 11a9d84

Browse files
authored
gppa-strip-tags.php: Added snippet to strip tags from populated values.
1 parent cb3020d commit 11a9d84

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* Gravity Perks // Populate Anything // Strip Tags from Populated Value
4+
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/
5+
*/
6+
add_filter( 'gppa_process_template_value', function( $template_value, $field ) {
7+
8+
// Update "123" to your form ID and "4" to your field ID.
9+
if ( $field->formId == 123 and $field->id == 4 ) {
10+
$template_value = strip_tags( $template_value );
11+
}
12+
13+
return $template_value;
14+
}, 10, 7 );

0 commit comments

Comments
 (0)