Description
Allows modifying the existing filter layout or styling.
Usage
Applies to all forms:
add_filter( 'gform_filter_ui', 'your_function_name', 10, 5 );
Parameters
Examples
Appends a custom message to the filter UI.
add_filter( 'gform_filter_ui', function( $gform_filter_ui, $form_id, $page_title, $gf_page, $gf_view ) {
// Your custom logic to modify the filter UI.
if ( $form_id == 123 ) { // Replace '123' with your form ID
// Customize the filter UI as needed
$filter_ui .= '<div class="custom-filter">Your Custom Filter Content Here</div>';
}
return $filter_ui;
}, 10, 5 );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in includes/addons/class-gf-addon.php: