Answers/Can I add conditional logic to forms?

Can I add conditional logic to forms?

Updated March 2026

Not on the backend. Sutrena forms are flat — every field is shown, every field is validated the same way regardless of what other fields contain.

If you need conditional logic — show field B only when field A is "yes" — you handle that in your frontend. Build a custom form, add JavaScript to show/hide fields, and POST the final data to Sutrena.

Sutrena validates what it receives. If a conditionally-hidden field is marked required, make it not required in the form definition and handle the logic in your frontend. Or create two separate forms — one for each path.

The hosted form at /f/{id} does not support conditional logic. It renders all fields. For anything beyond a simple flat form, build your own UI.

Is this a limitation? Yes. But it keeps the API simple. You define fields. You get data back. The complexity lives in your frontend, not in our form schema. Most conditional-logic form builders end up with a complicated DSL that is hard to debug. We skip that.

Ready to build?

Get a trial API key instantly — no signup required.

Conditional logic in forms — Sutrena | Sutrena