PHP API

Introduction

The PHP API provides tools for developers to access Gravity Forms when developing in the same server/site as Gravity Forms. Tasks such as developing a new Gravity Forms Add-On, creating a new field type or using a hook or filter to change default Gravity Forms behavior will all be covered here.

API Functions

  • GFAPI Class The GFAPI Class provides developers with a future-proof way to access most of the common core functionality in Gravity Forms such as retrieval and manipulation of form and entry data.

  • Helper Functions Gravity Forms provide these helper functions to assist developers with common operations when extending Gravity Forms.

Add-on Framework

The Add-On Framework provides basic functionality for developers when creating new add-ons for Gravity Forms. It provides a set of classes that can be extended to facilitate many aspects of developing add-ons such as initialization, settings pages, permissions, feed condition and script enqueuing.

Field Framework

The Field Framework provides classes and methods that can be used to create Gravity Forms field types (i.e. Text, Name and Address fields). All Gravity Forms built-in field types use the Field Framework and custom field types can be created as well.

  • Field Classes Each field class represents a field type (i.e. Text Field, Name Field, etc.) and define properties and methods that control how the field is rendered and how field data is handled.

  • Field Settings This section has articles that describe how to add settings to the General, Appearance and Advanced settings tabs of the field editor.

Constants

Gravity Forms supports a few constants for customization and initialization of data.