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
<?php 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
<?php 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