Community > Ideas
65 views
Under Review

Sending a Live Forms email to an address that populates a textbox

We have a Live Form on a website that retrieves data (via SQL statement) to populate a textbox with a Sales Rep's email (i.e. - token is SalesRep).

I want to use the Action > Communication > Send Email, and populate the "To Email" with the Sales Rep's email.

Using the token, [SalesRep], would not allow this to happen.

It would be great to have a way to send an email to an address retrieved via SQL Statement, that populates a textbox.

Data Fast Data Fast
published 03/23/2021 12:16
Add Comment
Josiah Olhava
replied 03/26/2021 19:50

I am able to do this using the Javascript action:

Make 2 fields:

  1. Name & token "Department" - 'Dropdown' with name|value pairs: Sales|[email protected], Support|[email protected], etc...
  2. Name & token "DeptEmail" - 'Email' field (must be this type) - make it hidden and leave it blank or you could add a default value if you want. 
     

Add action: changes the DeptEmail field with the value from the Department dropdown

  1. On Form View>Bind or update a single form field via JavaScript
  2. Action name: changeDeptEmail
  3. Field Name: DeptEmail
  4. Token: DeptEmail (token)
  5. Department (token)
     

Add action: send the email to the DeptEmail

  1. On Form Submission>Communication>Send Email
  2. Action Name: DeptEmail
  3. use the DeptEmail (token) in the "To Email:" field 
  4. fill in the rest as needed. 


In the steps above I could not post this while using the correct token syntax with the brackets around the token, so make sure you add the (tokens) using brackets [].

I don't have anything setup to bind the data using an SQL query, but maybe you can apply something here to get that working.

Last Activity 03/26/2021 19:54