How do I create several "if" statements with individual outcomes?

  • Profile Image
    Powstatan
    Asked on September 07, 2017 at 09:05 AM

    I am recreating a google form. I wrote a script that emails the recipient according to their name. Below is a sample of my code. Is there a way to do this in jotform? Thanks!

     

    if (ReferringTeacher == "Gilreath")

       MailApp.sendEmail ("***ath@bcps.org", subject, message);

    else if (ReferringTeacher == "Impallaria")

       MailApp.sendEmail ("**ria@bcps.org", subject, message);

    else if (ReferringTeacher == "Healy")

       MailApp.sendEmail ("****aly@bcps.org", subject, message);

    else if (ReferringTeacher == "Young")

       MailApp.sendEmail ("*****ng@bcps.org", subject, message);

    else if (ReferringTeacher == "Berger")

       MailApp.sendEmail ("eber****@bcps.org", subject, message);

  • Profile Image
    Chriistian
    Answered on September 07, 2017 at 11:07 AM

    Yes, this is possible in JotForm by setting up your Notification email and Change E-mail Recipient conditions.

    First, you need to setup your Email Notifications or Autoresponder email. You can check these guides for instructions on how to set up these email settings:

    Setting Up Email Notifications

    Creating a Form Autoresponder

     

    Second, setup Change E-mail Recipient condition based on your logic. 

    For more information, you can check this guide: How to Send Email Based on User's Answer.