Skip to main content
Participant
April 8, 2019
Question

Conditional email sending

  • April 8, 2019
  • 1 reply
  • 322 views

Hello -

I want to create a conditional script to send an email if a certain form field includes specific text. The form is already made to automatically be sent to a set array of emails when the user pushes the "Submit Form by Email" button, but I want to add a script on top of that that will submit the form additionally to another email address when there is specific information included in a specific field. Is there a way that I can do this? I'd really appreciate any help. Thank you!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
April 8, 2019

Yes. For example, you can use something like this:

if (this.getField("Text1").valueAsString == "John Doe") this.mailDoc({cTo:"john.doe@gmail.com"});