How can I conditionally set an email address based on the selected input from a dropdown field

  • mduggins01
    Asked on February 18, 2018 at 3:23 PM

    Hello,

    My Maintenance Request is used internally but unfortunately some of the users continue to type their email address incorrectly which results in them not receiving the autoresponder email. I would like to set the email address field to automatically select their email address based on the "facility" or "location" field answer. I have entered all of the email addresses into a dropdown field, but so far I haven't been able to get the conditions right. For an example of what I am wanting - If a user selects "American #1" in the "Location" field, the "Email Address" field will automatically populate the appropriate email address based on my settings. Any ideas?

  • Support_Management Jotform Support
    Replied on February 18, 2018 at 4:26 PM

    You won't be able to populate a dropdown field conditionally. A way to solve this is to utilize the following features - Calculation values, the form calculation widget, a read-only email field, and a condition to copy a value from one field to another.

    1. CALCULATION VALUES = These will be used to assign an email to each location respectively.

    How can I conditionally set an email address based on the selected input from a dropdown field Image 1 Screenshot 60

    Complete guide: How-to-Assign-Calculation-Value

    2. FORM CALCULATION WIDGET = This field will be used to fetch the assigned email value of the selected location. It's best to hide this field so your users won't see it. To hide a field, just right click on it > then select HIDE.

    How can I conditionally set an email address based on the selected input from a dropdown field Image 2 Screenshot 71

    Related guide: How-to-Manipulate-Text-String-with-Conditions-and-Calculation

    3. It's time to add the regular EMAIL FIELD and set it as READ ONLY so your users won't mistakenly edit them.

    How can I conditionally set an email address based on the selected input from a dropdown field Image 3 Screenshot 82

    4. And finally setup your CONDITION so the value from the calculation widget will be passed (or copied) to the read-only email field.

    How can I conditionally set an email address based on the selected input from a dropdown field Image 4 Screenshot 93

    Related guide: Smart-Forms-Using-Conditional-Logic

    Your form should behave like this afterwards:

    How can I conditionally set an email address based on the selected input from a dropdown field Image 5 Screenshot 104

    When you're done, set the read-only EMAIL FIELD as the recipient of your AUTORESPONDER.

  • mduggins01
    Replied on February 19, 2018 at 1:43 PM

    Thank you for taking the time to provide the steps. I have accomplished this task, but is there any way to prevent the calculation from showing up in the email?answers Screenshot 10

  • Richie JotForm Support
    Replied on February 19, 2018 at 2:38 PM

    Usually, the calculation values doesn't show up in the autoresponders.

    Can you please insert your screenshot again following this guide.-How-to-add-screenshots-images-to-questions-to-the-support-forum



  • mduggins01
    Replied on February 19, 2018 at 2:43 PM

    Please disregard. I figured it out.