I made a clear button to erase all data filled-in.
Upon clicking the button, I wanna show an alarm pop-up notification saying “Do you really want to delete the data?” with yes or no.
Does Glide have this fuction?
No, but you can simulate this functionality. Here is how I do it:
- Create a user specifc boolean column (I call it
usc/is-deleting
) - Add a button component to the details screen where you want the delete to happen. The action on that button should be a Set Column Values, setting the value of
usc/is-deleting
totrue
. And the visibility of this button should bewhen usc/is-deleting is not true
- Add a text or hint component with the warning message that you want shown. The visibility on this component should be
when usc/is-deleting is true
- Add a button bar component with yes/no labels, with the same visibility condition as the previous component.
- The yes button does the clear/delete action, and then clears the value of
usc/is-deleting
- The no button just clears the value of
usc/is-deleting
- The yes button does the clear/delete action, and then clears the value of
Here is what that looks like:
3 Likes