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.

    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
                          CRM 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 Estate Kiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives Security & Compliance
                          Holiday Forms Google Forms alternative  GDPR
                          Form to PDF Jotform alternative HIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag and Drop form builder
                          WCAG


                                            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

                                                                                                              • 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 ...
                                                                                                              • FAQs: Form Title - Appearance

                                                                                                                This page covers the significance of customizing form titles, including their purpose, functionality during tasks, default behaviors, character limits, customization options for different forms, and methods for previewing user appearances. What is a ...
                                                                                                              • Open Form B based on field value in Form A

                                                                                                                Requirement   Open another form based on the value entered in the first form. Use Case   A course - planning platform wants to design the learning plans based on the learner's current knowledge. If a learner is a working professional, one is asked to ...
                                                                                                              • FAQs:​ Create Form

                                                                                                                This page covers creating forms and utilizing templates to import and integrate data sources, allowing you to duplicate forms effortlessly and integrate with other services seamlessly. How do I create a form from scratch? To create a form from ...
                                                                                                              • Provide a link in a form, through notes field

                                                                                                                Requirement Open a link containing instructions required to fill a form. Use Case For any customer to use an application, registration is the first step. A registration form has some general instructions for filling the form. It would be best if they ...
                                                                                                                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