gravity_form()
function gravity_form( $id, $display_title=true, $display_description=true, $display_inactive=false, $field_values=null, $ajax=false, $tabindex=0, $echo=true, $form_theme=null, $style_settings=null )
Main Gravity Forms function call.
Should be used to insert a Gravity Form from code.
Since: 2.7.15 (Added $form_theme and $style_settings parameters.)
Source: gravityforms.php:7007
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$id | string | The form ID | |
$display_title | bool | true | If the form title should be displayed in the form. Defaults to true. |
$display_description | bool | true | If the form description should be displayed in the form. Defaults to true. |
$display_inactive | bool | false | If the form should be displayed if marked as inactive. Defaults to false. |
$field_values | array | null | null | Default field values. Defaults to null. |
$ajax | bool | false | If submission should be processed via AJAX. Defaults to false. |
$tabindex | int | 0 | Starting tabindex. Defaults to 0. |
$echo | bool | true | If the field should be echoed. Defaults to true. |
$form_theme | string | null | Form theme slug. |
$style_settings | string | null | JSON-encoded style settings. Passing false will bypass the gform_default_styles filter. |
Returns
string|void