setHidden() method of JSON Schema Form?

Hi - it appears that the JSON Schema Form component does not have a setHidden method. According to the docs (JSON Schema Form | Retool Component Library) and the in-line code completion.

As such, what's the best way to dynamically show/hide a JSON schema form component?

For my use case, I'm dynamically generating the form fields based on user input which occurs on the same page as the Json Schema Form component. Once they fill out a couple fields they hit "generate form" and the Json Schema Form gets created on the fly. So I'd like to hide the "ugliness" until the component has all the data required to generate and the user hits the "generate form" button.

Thanks!

Maybe put the JSON Schema Form inside of a container and then hide the container?

Thanks Scott - I like where your head is at. Only issue here is that I get an annoying "double" scroll bar - one for the form container, and one for the JSON Schema Form. And on top of that, the scroll bar for the modal popup.

Might be an interim solution though, appreciate it.

@Chris_Kramer You could make the container and the modal a fixed height/auto and the modal as well....good luck!

1 Like

Hey you two! Just want to toss in here that almost any UI field can be changed programmatically by passing a Retool variable (temp state) to it.

Then, instead of calling a setHidden method, you'd call hideSchemaForm.setValue(). Hopefully that helps!

Now that's clever!! Thanks @Kabirdas