Gravity Forms
CAFE works the same without Gravity Forms. When Gravity Forms is active, CAFE connects to it in four ways:
| What | Direction | Where you set it up |
|---|---|---|
| CAFE values in forms | CAFE → form | {cafe:field_name} merge tags in confirmations, notifications, HTML fields and default values |
| Choices from CAFE | CAFE → form | Choices from CAFE in the settings of a Drop Down, Multi Select, Radio Buttons or Checkboxes field |
| Save answers to CAFE | form → CAFE | Form Settings → CAFE (a feed) |
| Uploaded files | form → CAFE | A File Upload field mapped to a CAFE Image, File or Gallery field in that feed |
Requirements
- Gravity Forms 2.9 or newer. Tested with Gravity Forms 3.1.2.
- CAFE 0.16.0 or newer.
Nothing to switch on: when both plugins are active, the merge tags, the Choices from CAFE setting and the CAFE feed are there.
CAFE → Settings → Compatibility shows whether Gravity Forms is active, its version and whether it is new enough. Below Gravity Forms 2.9 the status is "Update needed" and the integration stays off.
How it fits together
Gravity Forms
↓ merge tags, choices ↑ feed (answers and uploads)
CAFE Gravity Forms adapter
↓
CAFE core (the same code as cafe_get_field() and cafe_save_values())
Gravity Forms never reads CAFE's database tables. Every value goes through
the same code as cafe_get_field() and cafe_save_values(), so languages,
caching, validation and transactions work the way they do everywhere else in
CAFE. CAFE keeps working if Gravity Forms is deactivated or deleted.
Pages
| Page | What it covers |
|---|---|
| CAFE values in forms | {cafe:field_name} merge tags, prefilling fields, which value is shown |
| Choices from CAFE | Filling Drop Down, Radio and Checkboxes choices from CAFE fields and Collections |
| Save answers to CAFE | The feed: where it saves, field mapping, how answers become CAFE values |
| Uploaded files | File Upload answers in CAFE Image, File and Gallery fields |
| Examples | Complete recipes: event sign-up, branch picker, profile form, job applications |
| Security | What the integration shows, reads and writes, and what it refuses |
| Troubleshooting | Empty merge tags, missing choices, a feed that saved nothing |
| Developer notes | Classes, hooks, stored data and using the integration from PHP |