How to show a confirmation pop-up on submit of a form

How to show a confirmation pop-up on submit of a form

Implementing a confirmation pop-up upon submitting a form validates and confirms user actions before proceeding. Users will be prompted with a confirmation dialog box when they submit a record. This enhancement improves the user experience by preventing unintended form submissions and providing an additional layer of validation for critical actions. The following steps can be configured with any of the main forms in your application to display a confirmation pop-up upon submission.
  1. Create a form with the following details to display as the confirmation pop-up.

    Form Name

    Form Link Name

    Field Type

    Field Name

    Field Link Name

    Confirmation Pop-up

    Confirmation_Popup

    (Duplicate this form to create a stateless form named Confirm Submit? with link name Confirm_Submit)

    Notes

    Notes
     
    Note: The content in the notes field will be presented to the user along with the pop-up. For example, we have entered the message 'Are you sure you want to submit the form?

    Notes

    Multi Line

    Temp Data

    Temp_Data

  2. Navigate to the form properties of the Confirm Submit? stateless form and rename the Submit and Reset buttons to Confirm and Cancel. Change their type from Submit and Reset to Button, as shown.

  3. Create a workflow to hide the Temp_data Multi line field in the Confirm Submit? stateless form, as it is used for internal purposes. Select Form event as Field Rules and name the workflow 'Hide Field'.

  4. Click Add New Action > Hide Fields and select the Temp Data Field, as shown.

  5. Create a new workflow to execute on the successful form submission of your preferred form (Main Form) to show a confirmation pop-up whenever a record is submitted (Created or Edited).

  6. Click Add New Action > Deluge Script and add the following code to the Deluge editor. This retrieves the entered values from the respective fields in the main form and generates a JSON representation. The resulting JSON is then populated into the hidden Temp_Data Multiline field in the Confirm Submit? pop-up form.
    1. //Fetch the added record by matching the ID with the Input records ID.
    2. sourceRecord =<Main_form_link_name>[ID == input.ID];
    3. //Fetch the field link names of all fields in the Asset_Requests form using getFieldNames(); function.
    4. fieldNames = sourceRecord.getFieldNames();
    5. //Create a map variable to store the field link name and its respective values in a JSON format.
    6. jsonObject = Map();
    7. for each  field in fieldNames
    8. {
    9. value = sourceRecord.getFieldValue(field);
    10.  jsonObject.put(field,value);
    11. }
    12. //Convert the JSON to TEXT using toString(); function.
    13. jsonString = jsonObject.toString();
    14. //encode the JSON string to supply the value in the URL parameter.
    15. encoded_json = encodeUrl(jsonString);
    16. //Open the main form by passing the entered values as query parameters before triggering the confirmation pop-up. This helps avoid the emptying of field values upon form refresh after submitting.
    17. openUrl("#Form:<Main_form_link_name>?<Field_link_name_1>="+input.<Field_link_name_1>+"&<Field_link_name_2>="+input.<Field_link_name_2>+"&<Field_link_name_3>="+input.<Field_link_name_3>,"same window");
    18. //Open the Confirm Submit? stateless form in the pop-up and supply the JSON values to the Temp_Data Multiline field.
    19. openUrl("#Form:Confirm_Submit?Temp_Data=" + encoded_json,"popup window","height=300,width=500");
    20. //Delete the submitted record to prevent entries without user confirmation.
    21. delete from <Main_form_link_name>[ID == sourceRecord];
    22. Where,

      <Main_form_link_name>

      is the link name of the form where the confirmation pop-up appears when the user clicks submit.

  7. Create a workflow to execute on Click of a Button in the Confirm Submit? stateless form and select the button as Confirm. Name the workflow as 'Submit Record'.

  8. Click Add New Action > Deluge Script and add the following code in the Deluge editor. This will insert a record in the main form with the fetched input values stored as a JSON in Temp_Data field of the Confirm Submit? pop-up when the user clicks the Confirm button.
    1. //Add the stored JSON data in the Temp Data field as a record in Main form by matching its field link names with the JSON key.
    2. insert into <Main_form_link_name>
    3. [
    4. Added_User=zoho.loginuser
    5. <Field_link_name_1>=input.Temp_Data.getJSON("<Field_link_name_1>")
    6. <Field_link_name_2>=input.Temp_Data.getJSON("<Field_link_name_2>")
    7. <Field_link_name_3>=input.Temp_Data.getJSON("<Field_link_name_3>")
    8. ];
    9. //Redirect the user back to the main form.
    10. openUrl("#Form:<Main_form_link_name>","same window");
  9. Create another workflow to execute on Click of a Button in the Confirm Submit? stateless form and select the button as Cancel. Name the workflow 'Cancel Record'.

  10. Click Add New Action > Deluge Script and add the following code in the Deluge editor. This closes the Confirm Submit? pop-up when the user clicks the Cancel button in the pop-up.
  1. //Close the Confirm Submit? pop-up window.
  2. openUrl("#Script:page.Close ","popup window");

See How it Works

 
  1. Stateless Form
  2. getFieldNames()
  3. encodeURL()
  4. openURL()
  5. Add Records
  6. Delete Records


    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION






                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Encrypted Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal
                          Mobile App
                          Form Designer HR
                          Mobile Forms
                          Card Forms Food Offline Forms
                          Assign Forms Photography
                          Mobile Forms Features
                          Translate Forms Real EstateKiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • Confirmation upon form submission

                                                                                                                1. What Does This Page Cover? Learn about the Confirm Form Submission form property that allows you (super-admin/admin) to ensure that your users don't accidentally submit forms in your Creator applications upon clicking Enter/Return keys on their ...
                                                                                                              • FAQs: Restrict Form Entries

                                                                                                                This page covers everything from customizing form messages to implementing Geo-fencing, empowering you with effective strategies for managing entries and enhancing security. Restrict Form Entries includes Enable Captcha, Allow one entry per user, ...
                                                                                                              • FAQs: Form Drafts

                                                                                                                This page covers everything you need to know about managing form drafts in Zoho Creator, from configuration and access to troubleshooting integration issues and ensuring data privacy. What are form drafts and how are they useful? Drafts allow users ...
                                                                                                              • FAQs: Components of Form Builder

                                                                                                                This page covers essential insights about Zoho Creator, a dynamic form builder, including how to seamlessly add, delete, and rearrange fields using the intuitive field palette, along with in-depth customizations in field properties. What is the form ...
                                                                                                              • Update a form using custom action (from another form's report)

                                                                                                                Requirement   Update a form using a custom action configured in another form's report. Use Case In an engineering college student management application, a student may withdraw at any time of the academic year. Whenever a student applies for ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources