| CARVIEW |
Select Language
HTTP/2 301
date: Wed, 31 Dec 2025 04:58:20 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_print_styles/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=GaerOChAUjZaSXQSO%2BuiJwN9wgx3sgQg%2F5%2BbJt%2FqoQ70iD2iI3SZzg%2Bp%2BijolcMqY65LV%2B08OBQkES%2B%2FEAivaz0n0zI8gCjjkkf7bvAV91UHa2%2Bo"}]}
cf-ray: 9b67337eba48c464-BLR
HTTP/2 200
date: Wed, 31 Dec 2025 04:58:20 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Chz3fH5FwW1GqVmabmlaJOYOPu%2FuZWxx6GXO1wuS%2BZzj6IGKHfFoaMAd0cHyol8fbT3mWujF%2Ffl8ugxgxSLHnHxRoim08FC7JHUvLvPyFAJv%2FnC%2B"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b6733854e00c464-BLR
gform_print_styles - Gravity Forms Documentation
gform_print_styles
Description
Use this filter to add custom stylesheets to the print entry screen.
Usage
add_filter( 'gform_print_styles', 'your_function_name', 10, 2 );
Parameters
- $value booleanDefaults to false.
- $form Form Object
Current form.
Examples
Example 1
This example adds the custom stylesheet print_entry.css to the print entry page when the form id is 1.
add_filter( 'gform_print_styles', 'add_styles', 10, 2 );
function add_styles( $value, $form ) {
if ( $form['id'] != 1 ) {
return $value;
}
wp_register_style( 'print_entry', get_template_directory_uri() . '/print_entry.css' );
return array( 'print_entry' );
}
Example 2
This example adds the custom stylesheet print_entry.css to the print entry page when the form id is 1 or 6.
add_filter( 'gform_print_styles', 'add_styles', 10, 2 );
function add_styles( $value, $form ) {
$forms = array( '1', '6' );
if ( ! in_array( $form['id'], $forms ) ) {
return $value;
}
wp_register_style( 'print_entry', get_template_directory_uri() . '/print_entry.css' );
return array( 'print_entry' );
}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in print-entry.php.