Skip to content

Instantly share code, notes, and snippets.

View CelesteComet's full-sized avatar

Bruce Wong CelesteComet

View GitHub Profile
@timhwang21
timhwang21 / conditional-fields.md
Last active July 7, 2022 16:25
Handling conditional field visibility in dynamic forms

Handling conditional field visibility in dynamic forms

This post explores several common ways of handling visibility of conditional fields. Our sample form will have the following schema:

  • foo: always present
  • bar: dependent on form state (value of foo)
  • baz: dependent on other application state (e.g. user permissions)

Below is our form, prior to implementing visibility logic: