Prefill content in a form based on another form

Prefill content in a form based on another form

Requirement

When one form is submitted with data, users are redirected to another form with pre-filled data from the previous form.

Use Case

An order management app contains two forms: one to store suppliers' details, and the other to store the details of the products supplied by the suppliers. When an admin enters the supplier's details in the Suppliers form and submits it, they are instantly redirected to the Products form with the Supplier field pre-filled.

Steps to follow

1. Create two forms with the following details:
Form
Form Link Name
Field Type
Field Name
Field Link Name
Suppliers
Suppliers
Single Line
Supplier Name
Supplier_Name
Products
Products
Single Line
Product Name
Supplier_Name
Single Line
Supplier
Vendor
 
2. Create a workflow with the following details:

The workflow is to be triggered when the Suppliers form is successfully submitted, so we are selecting the Form Event as "Successful form submission."
 
3. Click Add New Action and select Deluge Script.
 
4. Save the following Deluge snippet in the Deluge editor:
  1. openUrl("#Form:Products?Supplier=" + input.Supplier_Name,"same window");
The snippet uses the openURL deluge task to redirect users to the Products form on submission of the Suppliers form. It passes the value of the Supplier Name field in the Suppliers form to the Supplier field in the Products form.
 

See how it works

Points to note

  • This tutorial demonstrates the use case with a Single Line field type ( Supplier Name in the Products form). The same snippet would also work for the following field types:
    • Email
    • Phone
    • Multi Line
    • Rich Text
    • Formula
  • The following table specifies the required Deluge snippet for other field types:
Field type
Deluge snippet
Name and Address
Since these are composite fields, we have to pass the required sub field's name in the snippet in the following format:
  • <Name_field>.prefix
  • <Name_field>.first_name
  • <Name_field>.last_name
  • <Name_field>.suffix
  • <Address_field>.address_line_1
  • <Address_field>.address_line_2
  • <Address_field>.district_city
  • <Address_field>.state_province
  • <Address_field>.postal_Code
  • <Address_field>.country 
If more than one Name field is present in the form, the link names of the subsequent name sub fields will be modified by a number starting from 1. So, if we take the example of the subfield <field>.prefix, the link name of the first such field will be <field>.prefix, the link name of the second such field will be <field>.prefix1, the link name of the third such field will be <field>.prefix2, and so on. The same applies to Address sub fields.
 
If we want to pass a value to the first_name field, the D eluge snippet would look like:
  1. openUrl("#Form:Products?Name.first_name=" + input.Supplier_Name,"same window");
Lookup
Lookup fields are mapped to the related form through the ID of the selected field's record. Learn more.

Sample snippet:
  1. openUrl("#Form:Products?<Lookup_field>=" + input.ID,"same window");
Date and Time
Values being passed to a Date or a Time field can only be passed from another Date or Time field respectively.

Sample snippet:
  1. openUrl("#Form:Products?Order_Date=" + input.Supply_Date,"same window");
Drop Down, Radio, Multi Select, Checkbox
Only one of the existing pre-defined choices can be passed as a value.
Decision Box
One of the boolean values ( True or False ) can be passed as a value. The value True checks the box, and the value False unchecks it.
Currency, Decimal, Percent, Number
Only numerical values can be passed.
Add Notes
The passed value overwrites the existing notes on the form.
All other fields
This tutorial does not apply to all the other field types.


        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          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 LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG


                                      All-in-one knowledge management and training platform for your employees and customers.

                                                Create. Review. Publish.

                                                Write, edit, collaborate on, and publish documents to different content management platforms.

                                                Get Started Now




                                                                  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


                                                                        • Desk Community Learning Series


                                                                        • Digest


                                                                        • Functions


                                                                        • Meetups


                                                                        • Kbase


                                                                        • Resources


                                                                        • Glossary


                                                                        • Desk Marketplace


                                                                        • MVP Corner


                                                                        • Word of the Day


                                                                        • Ask the Experts


                                                                          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 Demo

                                                                                                            Get a personalized demo or POC

                                                                                                            REGISTER NOW


                                                                                                              Design. Discuss. Deliver.

                                                                                                              Create visually engaging stories with Zoho Show.

                                                                                                              Get Started Now








                                                                                                                                  • Related Articles

                                                                                                                                  • Functionality-based URLs

                                                                                                                                    Overview In the topic Zoho Creator URL Patterns we learned about the default URLs to access a Zoho Creator application and its forms, reports and pages. In this topic, we will learn about the functionality based URLs to set default values for form ...
                                                                                                                                  • Understanding redirection

                                                                                                                                    Understanding redirecting to a website, form, report, or page, on form submission When a user submits your form, you can enable redirecting them to any of the following: A website of your choice A form in the same app A report in the same app A page ...
                                                                                                                                  • Auto populate a field based on the selection from a lookup dropdown

                                                                                                                                    Requirement   When a value is chosen from a lookup dropdown, related values are populated in the other fields of the same form. Use Case   An order management app contains a form to store order details. When the admin chooses the customer name from ...
                                                                                                                                  • Understanding form workflows

                                                                                                                                    In a nutshell Form workflows are automated actions triggered by user activities on a form, such as creating, editing, or deleting records, collectively referred to as record events. These workflows are further fine-tuned by form events, which specify ...
                                                                                                                                  • Navigation-based URLs

                                                                                                                                    Listed below are the URLs that are used to navigate or do certain actions in Zoho Creator. Please note that all these URLs will work only within the application and not in permalinks and embedding. S. No URL Description 1 #Script:page.back Navigates ...
                                                                                                                                    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