alexri
December 13, 2020, 8:24pm
1
Hi,
I am displaying a form in an alert box . There is an option to delete the data from the alert box and I am trying to get a confirmation from the user before deleting via calling the confirm function. The confirm window however gets hidden behind the alert box. Is it possible to display the confirm window in front of the alert box?
Thanks
Al
Hi,
Please see this FR and the linked posts. I belive this is not yet possible in Anvil.
I have a few apps where the editing of information would really benefit from having multiple modal overlays similar to multiple dialog boxes in a Windows program. Below is a JSFiddle I found on StackOverflow that seems to demonstrate pretty much what I’m thinking of.
http://jsfiddle.net/CxdUQ/
In terms of Anvil usage, I feel like this would happen when an alert or confirm is opened from inside a form that is already contained in an alert or confirm, allowing for multiple overlays.
Is this fun…
It’s a real kludge, but I do something like this in a project :
https://anvil.works/build#clone:S5XR2VQU3VW7J2LZ=NKROKX2X6RFM75QE4REDSK2X
Clicking Save shows :
A mix of hiding and showing elements in the pop up. Not very glamorous, I admit. But it does kinda work, sort a kinda
1 Like
You can do this from the form that shows the alert by testing the response and then showing a separate confirmation. something like:
response = alert(content=form)
if response == "ok":
confirmation = confirm("are you sure?")
if confirmation:
do_the_thing()
stucork
December 14, 2020, 3:24am
5
4 Likes
Now that’s MUCH better than mine!
Mine is a legacy from before popovers.