CARVIEW |
Select Language
HTTP/2 301
date: Sat, 11 Oct 2025 20:14:11 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
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=Wq%2BOg20Qmlc%2BKHODDDVCfhYAYbrhYUBUR15EXA0tO%2F%2BHqnQ0uxjZ8lL41AQhZWGYdBKLFyIYfP9Fbuen%2FzJc8EpJRJUxbxXSwo1AwHmwAm%2BLRvkL"}]}
cf-ray: 98d105b11d1ed817-BLR
HTTP/2 200
date: Sat, 11 Oct 2025 20:14:12 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
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=iP1TExT1chM62pFj%2ByooceJ2McHN0ySah42U0CLMXuzHdP2qXqh%2FbV7goELkpdlLelJn%2FYSzMAtyua%2FmSvHUh9K1yBpERM%2F5dQI2iK%2BWjjTGiwrc"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 98d105b9aa86d817-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.