Yes No Confirmation Dialog Box

Forum to ask for any help
Post Reply
mcsortan
Posts: 8
Joined: Sat Sep 29, 2018 12:20 am

Yes No Confirmation Dialog Box

Post by mcsortan » Fri Apr 24, 2020 10:02 am

Hi all

Is it possible to have a yes/no dialog box to confirm the pressing of a button

I would like to have a confirmation when pressing my ‘power all off’ button which every now and again gets pressed accidentally

Thanks

cv27
Posts: 233
Joined: Sat Nov 24, 2012 10:15 pm
Location: Montréal, QC, Canada

Re: Yes No Confirmation Dialog Box

Post by cv27 » Sat Apr 25, 2020 5:17 am

Yes, you could do logic around that. But I find it simpler to use 'press & hold' to actually action the button.

Peter M
Posts: 15
Joined: Fri Sep 15, 2017 8:49 am

Re: Yes No Confirmation Dialog Box

Post by Peter M » Wed Apr 29, 2020 9:19 am

Yes. I have exactly the arrangement you describe for system power off.

My solution uses a sub-page which is normally hidden with visibility linked to a flag. When the "Power Off" button is pressed the flag is set, and the sub-page appears with two buttons on it. "Confirm" proceeds with the powering off, and "Cancel" just flips the sub-page flag so you go back to where you were.

Cheers,
Peter

manaman
Posts: 26
Joined: Sun Mar 19, 2017 12:19 pm

Re: Yes No Confirmation Dialog Box

Post by manaman » Sun May 24, 2020 11:03 pm

What Peter said. Just use a flag to load the 'confirm' sub-page, or even just buttons on the same page linked to the flag being on. Then yes does the action and cancel turns the flag off and hence the sub-page or buttons

Post Reply