API Functions
Articles
GFAPI Class
The Gravity Forms API Functions provides developers with a future-proof way to access some of the common core functionality in Gravity Forms.
Creating Forms with the GFAPI
The GFAPI::add_form() and GFAPI::add_forms() methods are used to create forms.
Duplicating Forms with the GFAPI
The GFAPI::duplicate_form() method is used to duplicate forms.
Updating Forms with the GFAPI
The GFAPI::update_form(), GFAPI::update_forms(), GFAPI::update_form_property(), and GFAPI::update_forms_property() methods are used to update forms and their properties.
Getting Forms with the GFAPI
The GFAPI includes methods that can be used to get and check if forms exist.
Deleting Forms with the GFAPI
The GFAPI::delete_form() and GFAPI::delete_forms() methods are used to delete forms.
Submitting Forms with the GFAPI
The GFAPI::submit_form() method is used to create an entry by sending input values through the complete form submission process.
Validating Form Submissions with the GFAPI
The GFAPI::validate_form() method, added in Gravity Forms 2.6.3.2, is used to validate the form input values. If the form passes validation the configured anti-spam checks will also be performed.
Creating Entries with the GFAPI
The GFAPI::add_entry() and GFAPI::add_entries() methods are used to add entries directly to the database.
Updating Entries with the GFAPI
The GFAPI::update_entry(), GFAPI::update_entries(), GFAPI::update_entry_property(), and GFAPI::update_entry_field() methods are used to update entries in the database.