Core Booster Hooks – gfpdf_description_spacer
Description
When displaying a field description, the default behavior is to include a spacer/divider between the description and the content. This filter allows you to change what that spacer value is.
Arguments
The following arguments are passed to functions that use this hook:
$spacer | string
- The spacer string to display between the field description and the value
- The default value is
<div class="gfpdf_description_spacer">—</div>
$field | \GF_Field
- The Gravity Forms field being processed
$entry | array
- The raw Gravity Forms Entry array.
$form | array
- The raw Gravity Forms form array
Usage
Change the spacer to six hyphens:
add_filter( 'gfpdf_description_spacer', function( $spacer, $field, $entry, $form ) {
return '<div class="gfpdf_description_spacer">––––––</div>';
}, 10, 4 );
Or remove the spacer altogether:
add_filter( 'gfpdf_description_spacer', '__return_empty_string' );