Save answers to CAFE
A feed saves answers into CAFE fields after the form is sent.
- Edit the form and open Settings → CAFE.
- Click Add New.
- Fill in the feed:
| Setting | What it does |
|---|---|
| Name | Your name for the feed |
| Save to | A new post, created for each entry, The post this form creates with its Post fields, or The profile of the logged-in user who sends the form |
| Post type, Status, Post title | Only for a new post. The status is Draft by default. The title can use merge tags; the default is {form_title} #{entry_id} |
| Fields | Each row is a CAFE field (left) and the answer that fills it (right). Pick a form field, or Add Custom Value for fixed text or merge tags |
| Condition | Only save when the answers meet a condition |
A form can have several CAFE feeds, for example one that creates a post and one that updates the sender's profile.
Where it saves
| Save to | The object | Good for |
|---|---|---|
| A new post | A post of the chosen type, made for each entry | Applications, bookings, listings, testimonials |
| The post from the Post fields | The post Gravity Forms makes with its own Post Title / Post Body fields | Forms that already create posts with Gravity Forms |
| The logged-in user | The profile of the person who sends the form | Profile and account forms |
Settings Pages are never written by a feed.
Which CAFE fields you can pick
The CAFE field list shows every field of groups for posts and users, with the kind of object in brackets: "Event (posts)", "Profile (users)". A field only saves when it fits the target: a user field mapped in a feed that saves to a post is skipped.
How answers become CAFE values
| CAFE field | Gravity Forms answer |
|---|---|
| Text, Email, URL, Color | The answer (several answers on separate lines) |
| Textarea, Rich Text | The answer, line breaks kept |
| Number, Range, Date, Date Time | The answer as sent. Gravity Forms stores dates as YYYY-MM-DD, which CAFE reads |
| Time | "02:30 pm" and "14:30" both become 14:30 |
| Select, Radio, Button Group | The value of the chosen option |
| Checkbox, Select with "Select Multiple" | Every checked option of a Checkboxes or Multi Select field |
| Toggle | Off for "0", "no", "false", "off"; on for any other answer |
| Post Object, Relationship, Taxonomy, User | IDs (one per answer, or separated by commas) |
| Image, File, Gallery | Files of a File Upload field, see Uploaded files |
Tip: with Choices from CAFE on a Gravity Forms choice field, the answers are already the values the CAFE field accepts.
Rules
- Empty answers are skipped. They never clear a value that is already stored.
- All or nothing. CAFE checks every value first (the same checks as the edit screen). When one value is invalid, for example a choice that does not exist, nothing is saved. The entry gets a note with the reason, and the feed error shows in the entry.
- One post per entry. When Gravity Forms processes an entry again, the feed updates the post it created the first time instead of making a new one.
- Logged-in users only for "The profile of the logged-in user": an entry from a visitor saves nothing (and says so in a note).
- After saving, the entry gets a note like "CAFE saved 4 fields to post 812."
Not saved yet: Collections, Section Builders, Link, Google Map and Password fields.