CARVIEW |
Select Language
HTTP/2 301
date: Wed, 15 Oct 2025 01:03:02 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=U%2BmPT6SX0hiUES%2FYvBb4KMkRxMBa6lY59LXS3NyWzlxOPGasfztDhjWVOCTjtoXocSccDaGyEU0QIgsOcMlo7lxU4JI3XlMjiSpvf%2BwfKpe5akBo"}]}
cf-ray: 98eb64ee2b52c7cf-BLR
HTTP/2 200
date: Wed, 15 Oct 2025 01:03:02 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=SrPv3vZDt1wn4qSxjbx66teFVRB25Qnbk0w0%2FWEI%2FGdzSdlDaq2Pex7VvT2L6jl%2BGD7Cij66AFHDGbQixOt3bfgK3etfuUS%2B2q%2BvzY9vloik%2F354"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 98eb64f80e52c7cf-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.