261
Views
1
Comments
A pop up Confirmation
Service Studio Version
11.54.42 (Build 63111)

Hello, I've been confused for the past few days. I have an input form, and every time I input data and finish filling it by clicking the button, I want to display a confirmation popup. In this confirmation popup, there should be the data that I filled in the previous input form. If I choose 'yes,' then the data will be submitted. However, if I choose 'no,' it should go back to the input form with the existing data. How do I create the popup and its logic?

2023-12-28 15-13-10
Mauro Alviza

Hi Julian!

You can do that by followin this steps:

1. Add a PopUp in your screen and in the Show PopUp property bind it to a local variable of boolean data type;

2. Then inside the popup put what you want to show. If you want to show the infos about the form, I recoomend you to just copy the form and paste it in the popup and write a title confimation in the top. Remeber to put the "enabled" property of each input to false, so the user can't change it. Then you can also change the buttons text, something like this:

3. Now, let's go to the logic. You want to bind the "Save" button of the form to a client action that opens the popup first, and then you want to bind the "Yes" button of the form to the client action that will save the form. To do that, first create a client action called "PopUpHandler" and it will handle the opening and closing of the PopUp. Inside that client action you just put an assign to the local variabe of the Popup that is: "ShowPopup = not ShowPopUp. Something like this:

We do this to open and close the PopUp. If the PopUp is closed, it will open, if its open, it will close. You can bind it to the "Save" button and the "No" button.

4. Then you want to bind your SaveAction to the "Yes" Button, like this:


And you are ready to go. With this logic, you can confirm if the user want's to save the data or no.

Tell me if it worked for you!

Cheers.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.