Description
Use this filter to enable HTML or specify accepted HTML tags in submitted entry data.
Usage
<?php
add_filter("gform_allowable_tags", "allow_basic_tags", 10, 3);
?>
You can also specify this per form by adding the form id after the hook name.
<?php
add_filter("gform_allowable_tags_6", "allow_basic_tags", 10, 3);
?>
Parameters
$allowable_tags
- (mixed) Default value is always false. Return true to enable all HTML tags or return a string of allowable tags like so: "<li><p>". For more information on allowable tags, refer to the PHP.net documentation for the strip_tags() function.
$field
- (Field Object) Current field.
$form_id
- (int) ID of current form.
Examples
This example enables some basic HTML tags for all fields of the form ID 6.
<?php
add_filter("gform_allowable_tags_6", "allow_basic_tags");
function allow_basic_tags($allowable_tags){
return '<p><a><strong><em>';
}
?>
Source Code
This filter is located in form_display.php