Basics/Required unless optional

Basics

Required unless optional

A field is required by default. In your app, pressing Submit with the form empty makes every field ask for an answer.

Most questions on a licence are required, so the engine makes that the quiet case. The few that are not say so with optional: true.

A café may not have a website. Make that field optional:

{
  key: "website",
  type: "text",
  optional: true,
  label: "Website",
},

An optional field shows Optional beside its label, is left out of the payload when it is empty, and does not count against progress.

Up nextChoices