predefinedFormElements
Lists the predefined form elements that can be added to a form.
Predefined elements are ready-made building blocks — each carries a fixed FormElement.name, its
FormElement.labels, and whatever else its FormElementType implies, such as the choices of a
ChoiceFormElement — that you add to a form instead of defining an element from scratch. Names are
unique within the returned list.
The formType argument selects which set is returned: PredefinedFormElementsType.CHECKOUT, the
default, returns the elements offered for checkout forms, and
PredefinedFormElementsType.TICKET_HOLDER returns the elements offered for forms that collect ticket
holder data.
Authorization is required. The set is resolved for the company currently selected for the
authenticated user and can therefore differ from company to company. It resolves to an empty list
when no company is selected, never to null.
To put one of these elements into a form, reproduce its name, type, labels and choices in a
FormElementInput for Mutation.createForm or Mutation.modifyForm. Setting predefined to true
locks the element: FormElement.canBeModified then resolves to false, and any later attempt to
change its name, labels or choices responds with an error.
query PredefinedTicketHolderElements { predefinedFormElements(formType: TICKET_HOLDER) { name labels { locale text } required ... on ChoiceFormElement { choices { value label(locale: "en") } } } }query PredefinedTicketHolderElements { predefinedFormElements(formType: TICKET_HOLDER) { name labels { locale text } required ... on ChoiceFormElement { choices { value label(locale: "en") } } } }
Arguments
| Argument | Description | Type |
|---|---|---|
| formType | PredefinedFormElementsType |
Type
This field resolves to [ FormElement! ]!.