| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 08:34:05 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_post_enqueue_scripts/
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: HIT
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=FivArfz9Q%2Fc%2FMzg8mZILvXmRoo6L0iWazyCb5zzqYxLfSQ40WRuTTr%2F9ktAOefGXPGp2WD0jOix1TMGTCYoZpbxZR3Y4%2Fu5OJUmOXpBbYt9PEy%2BW"}]}
cf-ray: 9b477a0cc813b080-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 08:34:06 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=olkjewUu3fvOV6aaRkTT%2B3gQJuBS1GgkN4c9mfN0eX69ZxDjwm2HqbLA13kY9tLEALpINXExC5w9x0Mtj6F2sw2DnMdlCkkU7%2BXkyO6WepxYba3K"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b477a118cdab080-BLR
gform_post_enqueue_scripts - Gravity Forms Documentation
gform_post_enqueue_scripts
Description
The gform_post_enqueue_scripts action hook is executed at the end of the process of enqueuing scripts and styles for each form embedded in the current page by shortcode or block.
Usage
add_action( 'gform_post_enqueue_scripts', 'your_function_name', 10, 3 );
Parameters
- $found_forms array
An array of found forms using the form ID as the key to the ajax status.
- $found_blocks array
A filtered version of the array returned by parse_blocks containing only Gravity Forms blocks.
- $post WP_Post
The page or post which was processed.
Examples
Basic Usage
add_action( 'gform_post_enqueue_scripts', function ( $found_forms, $found_blocks, $post ) {
foreach ( $found_forms as $form_id => $ajax_status ) {
// Do something for each form.
}
}, 10, 3 );
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?
Since
This hook was added in version 2.4.18.
Source Code
This hook is located in GFFormDisplay::enqueue_scripts() in form_display.php.