Skip to main content

GravityKit\GravityView\Form\FormGravityForms

The Gravity Forms Form class implementation.

Accessible as an array for back-compatibility.

Since:

  • 2.0
  • 3.0.0 (Migrated to GravityKit\GravityView\Form namespace.)

Source: src/Form/FormGravityForms.php:24

Details

  • Kind: class
  • Namespace: GravityKit\GravityView\Form
  • Extends: Form
  • Implements: ArrayAccess

Properties

PropertyTypeDescription
$backendstringThe identifier of the backend used for this form.
$formarrayThe form object.

Methods

MethodDescription
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

NameTypeDefaultDescription
$form_idint | stringThe internal form ID.

Returns

  • \GV\GF_Form | null — An instance of this form or null if not found.

Since: 2.0

Source: src/Form/FormGravityForms.php:58

from_form()

public static function from_form( $form )

Construct a \GV\Form instance from a Gravity Forms form array.

Parameters

NameTypeDefaultDescription
$formarrayThe form array

Returns

  • \GV\GF_Form | null — An instance of this form or null if not found.

Since: 2.0.7

Source: src/Form/FormGravityForms.php:83

get_entries()

public function get_entries()

Get all entries for this form.

Returns

  • \GV\Entry_Collection — The \GV\Entry_Collection

Since: 2.0

Source: src/Form/FormGravityForms.php:103

get_field()

public static function get_field( /** varargs */ )

Get a \GV\Field by Form and Field ID for this data source.

Parameters

NameTypeDefaultDescription
$form\GV\GF_FormThe Gravity Form form ID.
$field_idintThe Gravity Form field ID for the $form_id.

Returns

  • \GV\Field | null — The requested field or null if not found.

Source: src/Form/FormGravityForms.php:180

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: src/Form/FormGravityForms.php:200

__get()

public function __get( $key )

Proxies.

Parameters

NameTypeDefaultDescription
$keystringThe property to get.

Returns

  • mixed

Source: src/Form/FormGravityForms.php:225