is there a way to keep value in the form when hiding it ?
My goal :
display a form with customs fields for filtering a list in the bottom of the page.
Then, I want to hide the form when the list is filtered, but when I hide the form, the list disappear because values didn’t exists.
Not sure how did you set up a form to store values (??), may be you are meaning Input component.
If you hide the input via left pane, it becomes unavailable. What you can do is to minimise the input and make it white, so it still remains on the screen, but isn’t visible to a user.
Another option (worked before for me) is to have a separate screen, where I put all these inputs to store temporary values.
thanks for your reply.
Yes I use input component. I don’t see how minimize this input or make it white with a button action …
At the start, I used a modal for filtering a list on the main page and it worked. But now, the form in the modal is clear each time and I don’t create this action. I don’t understand … I think there is something change in Adalo …
Thanks.
Sorry, but I’m not sure I understand completely what would you like to do.
Do you want to create a hidden input, which is not visible to a user? Then you need to follow my advice above.
Do you want to hide input (make it invisible) after some user actions? Then make it “Sometimes Visible”, and set the conditions when would you like to show it or hide it. One of possible solutions could be:
create a True/False property in “Users” collection, call it “InputIsVisible”
Make Input sometimes visible when InputIsVisible=True
on the action leading to the screen with this input, “initialise” this property (Update → Logged-in User → InputIsVisible=True)
when you need to hide the input, for example, by pressing a button, put the very last action: Update → Logged-in User → InputIsVisible=False.
Ok, I understand the issue now. As I understood your requirements:
list is displayed to a user
user filters the list by entering value in Input
list is filtered dynamically (results are displayed)
user presses a button
input must disappear AND list should remain filtered.
With this strict requirements, I can’t imagine a direct solution to the problem, unfortunately :(. Though couple of workarounds might be useful:
have 2 lists on the screen, make them conditionally visible (say, using True/False property in Users collection, call it “ButtonPressed”). The first list should be visible when ButtonPressed is False - this is where search results are displayed, it is filtered by Input.
Then, after button is pressed, you copy the value from the Input to another input (transparent) or into the DB (you can create additional property, call it “FilterValue” to store the value in Users collection).
Then you update ButtonPressed to True → second list is displayed. And second list should be filtered by another input or value from Logged-in User → FilterValue.