GV\GF_Form
The Gravity Forms Form class implementation.
Accessible as an array for back-compatibility.
Source: future/includes/class-gv-form-gravityforms.php:14
Details
- Kind:
class - Namespace:
GV - Extends:
Form - Implements:
ArrayAccess
Properties
| Property | Type | Description |
|---|---|---|
$backend | string | The identifier of the backend used for this form. |
$form | array | The form object. |
Methods
| Method | Description |
|---|---|
by_id() | Construct a \GV\GF_Form instance by ID. |
from_form() | Construct a \GV\Form instance from a Gravity Forms form array. |
get_entries() | Get all entries for this form. |
get_field() | Get a \GV\Field by Form and Field ID for this data source. |
get_fields() | Get an array of GV Fields for this data source |
__get() | Proxies. |
Method Reference
by_id()
public static function by_id( $form_id )
Construct a \GV\GF_Form instance by ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | int | string | The internal form ID. |
Returns
- \GV\GF_Form |
null— An instance of this form or null if not found.
Since: 2.0
Source: future/includes/class-gv-form-gravityforms.php:48
from_form()
public static function from_form( $form )
Construct a \GV\Form instance from a Gravity Forms form array.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The form array |
Returns
- \GV\GF_Form |
null— An instance of this form or null if not found.
Since: 2.0.7
Source: future/includes/class-gv-form-gravityforms.php:73
get_entries()
public function get_entries()
Get all entries for this form.
Returns
- \GV\Entry_Collection — The \GV\Entry_Collection
Since: 2.0
Source: future/includes/class-gv-form-gravityforms.php:93
get_field()
public static function get_field( /** varargs */ )
Get a \GV\Field by Form and Field ID for this data source.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | \GV\GF_Form | The Gravity Form form ID. | |
$field_id | int | The Gravity Form field ID for the $form_id. |
Returns
- \GV\Field |
null— The requested field or null if not found.
Source: future/includes/class-gv-form-gravityforms.php:170
get_fields()
public function get_fields()
Get an array of GV Fields for this data source
Returns
- \GV\Field[] |
array— Empty array if no fields
Source: future/includes/class-gv-form-gravityforms.php:190
__get()
public function __get( $key )
Proxies.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$key | string | The property to get. |
Returns
mixed
Source: future/includes/class-gv-form-gravityforms.php:212