Table of Contents
What is an email element?
The Email element allows you to collect email addresses out in the field and send records to those email addresses when the data is synced.
How do I dynamically populate an email?
STEP 1. Add a Multi-Select element to your form with a data column name of my_multi.
STEP 2. Attach your Option List. In this example, we'll be using an Option List that includes the following choices:
- Option 1
- Option 2
- Option 3
STEP 3. Below your Multi-Select element, place a Text Area element with a data column name of text_copy.
STEP 4. In the Dynamic Value of the Text Area element, put the following: ZCDisplayValue_my_multi. This tells the element to use the Label of the element chosen instead of the Sort Order.
PLEASE NOTE: The Text Area element does not need to be visible to the end user. To hide the element on the user's device, simply put false into the Condition Value of the element.
STEP 5. Add an Email element and make sure the Send Email box is checked.
STEP 6. In the Dynamic Value of the Email element, put the following: replaceText(text_copy).
myText = myText.replace("Option 1","firstname.lastname@example.org, email@example.com");
myText = myText.replace("Option 2","firstname.lastname@example.org, email@example.com");
myText = myText.replace("Option 3","firstname.lastname@example.org, email@example.com");
STEP 9. Save your form.
STEP 10. Test the functionality on your device.
Download this form package to use as an example of how to dynamically populate your email element.