Hello, the problem is about a questionaire (and submitting the results)
I have a listView1 with select components
Tabs control the the listView content, as the questions have to change (they come from different sources, I could do it from one long list of qustions taken from one query too, but thats the way to separate them by type)
I want to submit all the answers to the retool database.
At this moment when I want to submit listView data - it submits only, obviously, the questions from given tab. How to submit all the questions, answers from all tabs? Maybe a temporary state could help?
1. Create a list view for each tab
What you could do is have a separate listView component for each possible tab that are all hidden by default. Then based on the given tab, change the hidden status to true for the listView tied to that tab.
Then you can submit the content of that temporary state to your database.
3. Use the Wizard component
Instead of using tabs you could use the wizard component to dynamically guide users through the questionnaire based on their previous answers. Then between every screen, create a virtual step that submits the previous answer directly to your database or add it to the temporary state like in the previous steps. (More info on wizards here: Build a series of steps with branched paths using the Wizard component | Retool Docs)
Thank you! I need to dinamically add 'steps/tabs/ names from db, so the wizard is not an option, as it do not allow that. I will try to create the temporary state and tabs. Thanks you!