bookmark_bordergravity_form_enqueue_scripts()

Description

This function will enqueue the necessary styles and scripts for the specified Gravity Form. This is useful when manually embedding a form outside the WordPress loop using the function call or to force the stylesheets and scripts to load in the header when using the Form Widget.

Usage

gravity_form_enqueue_scripts( $form_id, $is_ajax );

Parameters

  • $form_id integer

    The form ID of the targeted form.

  • $is_ajax bool

    Specify true to use ajax form submission. Default value is false.

Examples

gravity_form_enqueue_scripts( 4, true );

Placement

This script should be placed in the theme’s header.php file just before the wp_head() function is called.

Source Code

This filter is located in gravityforms.php