What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Is there a way to import relational data via an excel document and use it on condition

    Asked by gcancelliere on January 08, 2016 at 02:42 PM

    My company needs a form that allows you to choose an office within the company via a dropdown list. After an office is selected and the form is submitted, the email associated with that office will receive an email.

    Can an excel document be imported that includes all the office and their emails

    Instead of writing a conditional statement for each office/email, can I have one condition that runs against this excel doc?

    We have hundreds of emails so the traditional way of doing it in jotform is extremely time consuming.

    Any help would be greatly appreciated.

    Thank you.

    sync dropdown index index number match dropdown match index
  • Profile Image
    JotForm Support

    Answered by EltonCris on January 09, 2016 at 03:57 AM

    Unfortunately, there's no feature in the condition where it can read data from an excel file or import data from it. You have to define each condition rule and target email(s) within the condition wizard.

    However, I think the following workaround will work for you. But this requires using the form source code since you have to inject the custom script (provided below) under your form source code. This is some sort of matching the first dropdown selection into the second dropdown base on their index number.

    To do that:

    1. First, create two dropdown fields, name the first dropdown as office and the second is email. (You can also hide the email field if you don't want it to appear on the live form, right click the field > hide field)

    2. Enter all the office data in the office dropdown options, then the email addresses in the email dropdown options.

    3. Set the email dropdown field as the recipient of the form by creating an autoresponder message.

    4. Get your form source code, and inject the following script under it.

    <script type="text/javascript">

    var offices = $('input_1'), //your first dropdown ID

        emails = $('input_3'); //your second dropdown ID

         

    offices.onchange=function(){

      emails.selectedIndex = offices.selectedIndex;

    </script>

    Make sure to replace the input IDs on this script as labelled. Input IDs can be taken from the field properties (right click the field > edit properties). Example:

    5. Save your form source code or embed it on your website.

    Demo: https://shots.jotform.com/elton/syncDropdownOptions.html

    Hope this hepls!