Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
Yes. For example, you can use something like this:
if (this.getField("Text1").valueAsString == "John Doe") this.mailDoc({cTo:"john.doe@gmail.com"});