Could you please guide me to achieve the following template with JSON?
If select yes," i have to show the text box; otherwise, it should be hidden.
Could you please guide me to achieve the following template with JSON?
If select yes," i have to show the text box; otherwise, it should be hidden.
Hi @gowthaman-murugan ,
To show the text box inline between the two options, you need to implement a custom renderer.
However, what you could do is use a checkbox (true/false) for the question and then only show the detailed field when the checkbox is checked. For this, you can use a SHOW rule. See the docs on how to use rules: Rules - JSON Forms
Thanks for the reply @lucas-koehler, I am new for this, I need help to how to design the JSON for this, if I go with schema object , I render a radio button list with help withJsonFormsControlProps but i dont know how to render text box with, could you please help on how to create a render for this? and could you please guide me
"restorations": {
"isRadioTextGroup": true,
"label": "Planning for Restoration?",
"type": "object",
"properties": {
"planning_for_restorations": {
"type": "string",
"enum": [
"Yes",
"No"
],
},
"planning_for_restorations_details": {
"isInput": true,
"type": "string",
"options": {
"placeholder": "Please add details for restorations",
}
}
},
The schema you posted should already work out of the box, so no custom renderer is needed. What exactly are you struggling with?