Description
This jQuery hook is fired every time the form is rendered to allow custom jQuery to be executed. This includes initial form load, going to the next/previous page on multi-page forms, form rendered with validation errors, confirmation message displayed, etc.
Note: This event was replaced by the gform/postRender
event in Gravity Forms 2.9.0.
Usage
jQuery(document).on('gform_post_render', function(event, form_id, current_page){
// Do something.
});
Parameters
- event Event Object
The JavaScript event object.
- form_id integer
The ID of the form in use.
- current_page integer
The page number of the page being loaded.
Examples
jQuery(document).on('gform_post_render', function(event, form_id, current_page){
console.log( 'gform_post_render - form id:, form_id );
});
Placement
Your code snippet can be placed in an HTML field on your form or in a theme custom JavaScript file.
See also the JavaScript/jQuery section in this article: Where Do I Put This Code?
Since
This filter was added in Gravity Forms version 1.6.
Source Code
This filter is located in form_display.php