Choices from CAFE
Keep one list of options and use it in both plugins.
- Edit the form and click a Drop Down, Multi Select, Radio Buttons or Checkboxes field.
- Open Choices from CAFE (just above the choices).
- Pick the source:
| Source | Choices |
|---|---|
| Choices of "Field" | The options of a CAFE Select, Radio, Checkbox or Button Group field: the CAFE value becomes the choice value, the CAFE label the choice text |
| Items of "Collection" (Sub-field) | One choice per item of a Collection, with the sub-field as value and text |
The list only shows people who can edit forms, grouped by field group.
Choices of a CAFE field
Use this when the same options exist in CAFE and in the form, for example "Province" or "Size". Change the options in the CAFE field group and every form that uses them follows. Answers are the CAFE values, so a feed can save them straight into that CAFE field.
Items of a Collection
One choice per item: the chosen sub-field is both the value and the text. Empty texts and repeated texts are left out.
| Where the Collection is | Use it for |
|---|---|
| A Settings Page | Site-wide lists: branches, products, time slots, departments |
| Posts or pages | Lists that belong to the page the form is on, for example the sessions of an event page |
Sub-fields that can be the text: Text, Number, Email, URL, Select, Radio, Button Group, Date, Post Object, Taxonomy and User.
In the form editor and Preview
The form editor and Preview show the same CAFE choices as the live form, so you can see that the field is linked.
Choices from a Collection on a page need that page. The editor and Preview
are not on a page, so CAFE uses the page the form is placed on: the first
post or page with the form's shortcode ([gravityform id="1"]) or Gravity
Forms block, published pages first. This only happens for people who can
edit forms.
When the form is not placed on any page yet, the editor and Preview show the form's own list. Place the form on a page and reload.
When you change Choices from CAFE, save the form and reload the editor to see the new choices.
The form's own list
On the live form the CAFE choices replace the field's own list. The form's own list stays as a fallback: it is shown when CAFE has no choices, for example a Collection without items. Keep a sensible list there.
Saving the form in the editor stores the CAFE choices shown at that moment as the form's own list, so the fallback stays close to the real choices.
Choices that the form marks as selected by default stay selected when their value is in the CAFE list.
While answers are checked and saved
The CAFE choices are also in place while Gravity Forms checks and saves an answer, so its "is this one of the choices" checks use the CAFE list, and the entry screens show the CAFE labels. Checkboxes get one input per CAFE choice.