Hi,
I’m trying to create a JSON form in react. The form should contain an enum control that generates other controls based on the value the user choose in the enum. For example, let’s say the enum button has the following options: ‘option 1’, ‘option2’ and ‘option3’, then, if the user chooses ‘option 2’ a string control appears in the form.
Thank you!
Hello @daniellazabari ,
showing controls conditionally based on the value of another property, i.e. showing the string control when the enum has value ‘option 2’, can be achieved by using rules.
You can find documentation and an example on using rules in the JSONForms documentation:
- See here for documentation on rules: Rules - JSON Forms
- See here for an example on using rules: Rule Example - JSON Forms
1 Like