Basics
Showing a field sometimes
Some questions only make sense after another answer. A café that already has a fire safety certificate should give its number; one without should not be asked.
when names another field in the same section and what its answer must be:
when: { field: "has_certificate", equals: true },
Add it to the certificate number, then answer Yes and No in the preview:
{
key: "certificate_number",
type: "text",
label: "Certificate number",
when: { field: "has_certificate", equals: true },
},
A hidden field is not asked, not sent and not in the review. equals is one test of several: in, includes and filled cover the rest.