gform_init_scripts_footer

Description

This filter is executed during form load. When set to true, the form init scripts are loaded in the footer of the site, instead of the default location of which is in the page body immediately after the form.

Note: This filter does not occur when AJAX is being used within the form.

Note: As of Gravity Forms 2.5 scripts are included in the footer by default.

Usage

add_filter( 'gform_init_scripts_footer', '__return_true' );

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?

Source Code

This filter is located in GFFormDisplay::get_form() in form_display.php.