Gravity Forms
Gravity Forms is one of the most popular premium form builders for WordPress. With this receiver integration, AFI can create entries, update existing entries, and add notes to Gravity Forms entries from any sender form submission. This means you can take data from Contact Form 7, WPForms, Elementor, or any other supported form plugin and insert it directly into a Gravity Forms form as a new entry.
No API key or external HTTP connection is needed. AFI communicates with Gravity Forms through the native GFAPI PHP class, so the Gravity Forms plugin must be installed and activated on the same WordPress site.
What you’ll need
- The Gravity Forms plugin installed and activated on your WordPress site.
- At least one Gravity Forms form created.
- The Advanced Form Integration plugin installed and activated.
Create the integration
- Go to AFI → Add New.
- Give the integration a name, for example
WPForms to Gravity Forms. - Under Trigger, pick the sender form plugin and the specific form.
- Under Action → Platform, select Gravity Forms.
- In Task, choose one of the tasks below.
- Select the target Gravity Forms form from the dropdown. Available forms are fetched automatically via
GFAPI::get_forms(). - Map the sender form fields to the Gravity Forms fields.
- Click Save Integration.
Tasks supported
Create Entry
Creates a new Gravity Forms entry in the selected form using GFAPI::add_entry(). All mapped fields are populated with values from the sender form submission. The entry is created with status: active by default.
When you select a Gravity Forms form, AFI dynamically fetches all fields defined in that form (including multi-input fields like name, address, and checkbox groups) and presents them for mapping. Each field shows its Gravity Forms field ID in the description for easy reference.
Update Entry
Updates an existing Gravity Forms entry using GFAPI::update_entry(). You must provide the Entry ID of the entry to update. AFI fetches the existing entry, merges the mapped field values, and saves it back. Only fields that have a non-empty mapped value are overwritten.
Add Entry Note
Adds a note to an existing Gravity Forms entry using GFFormsModel::add_note(). You must provide the Entry ID and the note content. The note is attributed to the current WordPress user (or “Advanced Form Integration” if running under a system account).
Entry fields
Form fields are fetched dynamically from the selected Gravity Forms form. Each field in your Gravity Forms form appears as a mappable input in AFI. The field labels come from your Gravity Forms field settings, and each field’s description shows its Gravity Forms field ID (for example, Field ID 1 or Field ID 2.1 for multi-input fields).
Multi-input fields (such as Name with First/Last, Address with street/city/zip, or Checkbox groups) are broken out into individual sub-fields, each with their own input ID (e.g. 2.1, 2.2, 2.3).
Additional entry metadata
Besides form fields, AFI also supports setting the following entry metadata on create and update:
| Metadata field | Key | Notes |
|---|---|---|
| Entry Status | entryStatus |
active, spam, or trash |
| Source URL | sourceUrl |
|
| User Agent | userAgent |
|
| IP Address | ipAddress |
|
| Created By (user ID) | createdBy |
|
| Currency | currency |
|
| Payment Status | paymentStatus |
|
| Payment Amount | paymentAmount |
|
| Payment Date | paymentDate |
|
| Transaction ID | transactionId |
|
| Entry Note | entryNote |
Optional note saved to the entry after creation or update |
Conditional logic example
Only create a Gravity Forms entry when the sender form’s lead_source field equals “website”. Other submissions are skipped. You can also set up separate integrations with different field mappings based on conditions.
Troubleshooting
“Gravity Forms is not active”
This error appears in the AFI log when the Gravity Forms plugin is not installed or not activated. Make sure Gravity Forms is active on the same WordPress site.
“A Gravity Form must be selected”
No form was chosen in the integration. Go back to the integration editor and select a Gravity Forms form from the dropdown.
Entry created but fields are empty
Check that the sender form fields are correctly mapped to the Gravity Forms field IDs. Multi-input fields (name, address) require mapping to the specific sub-field IDs (e.g. 1.3 for First Name, 1.6 for Last Name).
Update entry fails
Verify that the Entry ID being mapped corresponds to an existing Gravity Forms entry. If the entry was deleted, the update will fail. Check the AFI log for the exact error message from GFAPI::get_entry().