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

  • Powstatan
    Asked on September 7, 2017 at 9: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);

  • Chriistian Jotform Support
    Replied on September 7, 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

    How do I create several if statements with individual outcomes? Image 1 Screenshot 40

     

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

    How do I create several if statements with individual outcomes? Image 2 Screenshot 51

    How do I create several if statements with individual outcomes? Image 3 Screenshot 62

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