Skip to content
Playground Form Builder

Dynamic forms

Using the following JSON Schema keywords, you can build forms that change in response to user input.

Fields oneOf or anyOf can be used as a virtual selector. This selector does not modify form data directly but determines which schema is active.

When the form is initialized with initialValue, SJSF automatically selects the most suitable schema based on the data.

The dependencies keyword allows you to declare relationships between fields, where the presence or value of one field affects the schema of others.

The if/then/else keywords allow you to define conditional schema branches based on form data.

If your schema uses the patternProperties keyword, see the advanced example pattern-properties-validator to improve the user experience.