Conditional Notification Emails on Form Submission

John Walter asked on October 9, 2015 17:30

I am trying to get the notification emails to submit based off of the entries of a form. I have tried two techniques and neither seem to work:

{% x = {%QueryString.whose%}; if (x>"1") {"test@email.com"} else {"test2@email.com"} %}

In this technique it seems to resolve the querystring value and then the rest is retained as just text instead of resolving the entire macro.

{% if (Email2 == "2") { 

return "test@gmail.com" } else { return "test2@gmail.com" } %}

In this one, it just fails.

Anyone have any ideas for this?

I currently have it working by having a hidden field which takes the value from a querystring and then I have the "to e-mail" set to the value of that hidden field. This works, however I am looking for a way to not have to have the email address shown in the url & link.

Thanks in advance!

Correct Answer

Roman Hutnyk answered on October 9, 2015 20:11

John,

{% x = {%QueryString.whose|(identity)GlobalAdministrator%}

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.