Press button -> update user -> make fields empty

Hi,

I have a filter for categories, but instead of having a category for “all” I want to have a button that resets the filters pressed by the user.
The only thing I need is that the button deletes the “temporary search phrase” field for the logged in user. Is there a smart way to go about it?

The problem with having a search filter containing “All” is that my button for resetting filters should only be visible if the logged in user → “temporary search phrase” = empty.

video 1 min question in video format:https://yac.com/play/mw-rAxt6D

thank you :slight_smile:
Axel

This is following on this topic where Dilon and Victor helped Filter list based on item of another list - #3 by axme

Hi Axel,

Something like this? : remove filters.mp4 - Google Drive

Thank you

Hi Dilon, thank you for this. It’s a very good way of solving it but it’s not the use case for my site.

In yours, the second category is dependent on the first selection, whereas in mine the two categories are independent from each other.

I think I might remove the second category, as I didn’t find a good solution for it.

@axme
You can set the text field/s to ‘empty’ by updating it to Date & Time = none. Wonky, but it works.

3 Likes

thanks! I ended up putting an invisible empty input field to make the field go empty when the buttons is pressed. Also quite wonky but works :wink:

I think better to go with the date = none, one less link in the chain and less risk of layout issues. It has been mentioned that hidden inputs can be found in certain scenarios, unless of course it is on a different screen altogether. Each to their own, and one day Adalo will give us native “null” as an option.

Especially important to consider use of hidden inputs in web based apps IMO.

Hi Axel, Like how you need them? Both lists are displaying categories right?

Oh yeah! Forgot this! After this was released tried the same and it works :joy:Thanks @Rozza for adding this!