| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 23:05:48 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform-post_init/
server: cloudflare
x-redirect-by: Yoast SEO Premium
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
fastcgi-cache: HIT
strict-transport-security: max-age=31536000; includeSubDomains
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=j5DRjYOrCmsaeBf8anYaYkgslWTg7QPOwOGfSHvwhRAzUz3iuIXDJVgc3Y6U4YAvOrRhkLYkOT6p1iKDH7T6%2BlcOscXyM1Yp6QQBPQ03wl%2FPFP9X"}]}
cf-ray: 9b4c76fbec3f8a2a-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 23:05:49 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=2uBiCGFH4xqUdm1jThNM40U4KT2KrhXuOu%2BUzh717oj%2FAQ0YhitBubhHFeWY7QF9cCSKIcNdbbjzsXLFpn%2Br0zF%2BGaiQLJ8yGZf3dJ9qULKYGGm2"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b4c7700bdd88a2a-BLR
gform/post_init - Gravity Forms Documentation
gform/post_init
Description
The gform/post_init event is triggered once a form is fully initialized and all necessary scripts are loaded. This event is intended for use by add-ons that depend on core scripts. It fires once per form and provides the form ID as a parameter.
Usage
document.addEventListener( 'gform/post_init', ( event ) => {
// Custom logic here
} );
Parameters
- formID int
The id of the form.
Examples
Show an alert message
// Show an alert message
document.addEventListener( 'gform/post_init', ( event ) => {
alert( 'post init fired.' + event.detail.formId );
} );
Placement
Reference the article Adding JavaScript Code to the Frontend of Your Site.
Source Code
This event is located in gravityforms.js.
Since
The filter was added in Gravity Forms 2.9.0