Documentation

gravity_form_enqueue_scripts()

  1. Description
  2. Usage
  3. Parameters
  4. Examples
  5. Placement
  6. Source Code

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.

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