I need to render an array which have radio element whit some preset options and where last option will be “Other” which will enable a free text input when selected.
Radio is not mandatory I could achieve almost same result rendering a select box. See following pic.
“altro” field is enabled only when third radio is selected.
Thank you all!
Hi @sebbalex(sebbalex). There are multiple ways to achieve this, for example you could use an array which contains objects with an enum and an other property.
The downside of this solution is that you have two separate properties in your schema (and therefore in your resulting data object) and selecting option 1 or 2 will not remove an already set other string.
If you would like to have only a single property in your schema you’ll need to write a custom renderer.
No problem The radio input was present but not properly dispatched to in previous versions of JSON Forms, so maybe you were still on an older version. Glad that it works now!