With Zingtree’s data entry, you can do things like…
- Add form fields to your workflows (text, list boxes, check boxes, radio buttons, dates and numbers).
- Include form data dynamically in other parts of the workflow (i.e. you can ask for a name in the first node, and have that name appear in other parts of the workflow).
- Export form data into any other system, including Help Desk or CRM applications.
- Validate email and phone numbers, as well as USPS addresses.
For example, your workflows can gather data like this:
How to Include Data Entry Fields in your Workflow
- Edit a content node.
- Click the Data Collection Form Fields dropdown, then Add Data Form Field.
- A new Data Entry field dialog appears. Select the type of data you want to collect, and enter a variable name and a label that the end-user will see.
- Optionally, you can also enter Help Text. The Help text is descriptive text that will be displayed directly below the input Label, like this:
For radio buttons and list boxes, enter the option choices one per line. If you are using scoring variables, you can enter a score variable, and a score value to assign to each choice. In the example below, the residence variable will be assigned a residence_score of 2 if Own is selected, or 1 if Rent is selected.
List Box Filtering: We recommend leaving this option turned on. Users will be able to type to quickly filter a long list box of items. Like this: - Select Required Field to make this field require an entry before proceeding.
- Click the Add button when finished.
Conditional Form Fields
You can easily create data entry form fields that only display when certain conditions are met. You decide when they appear based on simple logic rules. This can help streamline your workflow by reducing unnecessary clicks and shortening session durations — only showing fields when they’re needed.
For example, here’s a standard field asking if you own or rent your residence:
- If you select Own, a field asking for the monthly mortgage amount will appear.
- If you select Rent, a field asking for the monthly rent amount will appear.
- If you select Neither, no conditional field will be presented.
Adding Conditional Fields
You can add conditional fields in the same way you add any other standard data entry field.
In this example, we’ll create three form fields — two of which are conditional upon the first. Conditional fields do not need to be on the same node as the variable they depend on. They can be placed on the same node, or any subsequent node that follows the dependent variable.
To make a field conditional upon the value of another variable:
- Add your field as you normally would.
- Switch the Conditional option to the ON position.
Once enabled, set the conditions. The Display When condition is based on the variable of a previous field (or any other variable available in your workflow). Clicking into the field will show you all of the variables that are currently available in your workflow.
In this example, we’re setting the mortgage_amount field to display only if the variable residence is equal to Own.
Note: Values are case-sensitive and must exactly match the value of your previously configured options.
More Examples of Conditional Fields
Here’s another example:
You might collect an age variable and set a conditional field called baby_gifts to display only if age < 1 (less than 1).
You could then set up other list box options to display different fields based on other ages.
Operators for Conditional Fields
These are the simple logic operators that can be used for your Conditional Fields:
| Operator | Meaning |
|---|---|
| = | is equal to |
| ≠ | is not equal to |
| < | is less than |
| > | is greater than |
| ≤ | is less than or equal to |
| ≥ | is greater than or equal to |
Advanced logic operators are coming soon for Conditional Fields.
Using Required Conditional Fields
Conditional fields can be set to required. They will only be required if the field is displayed (i.e., when the condition you’ve specified is met).
Limitation: Repeating Forms
Note that Conditional fields are not available for use on forms that are set to allow more than 1 submission.
Inserting Form Field Data into Other Parts of the workflow
Once the end-user adds data to a form field and then clicks a button, this data can appear anywhere in the workflow’s content, question or title areas. The trick is to use the variable name, surrounded by # characters. For example, after adding a text input field named name, insert text like this into a node to show the value of name:
Hello #name#! Welcome back.The #name# part will be replaced with whatever was entered previously into the namefield.
Injecting Zingtree Form Data into Other Systems
Once your form fields are set up and your workflow is running, the entered data can be injected into any other form. Here’s how to do it:
- Make sure the variable names in your Zingtree form match the variable names on the form you want to inject data into.
- When opening the URL for the destination form, make sure to include &session_id=#session# in the link URL.
-
In the destination form, include this piece of code:
<script id="zingtree_field_id" value="session_data" src="//zingtree.com/api/zingtree.js"> </script>
When the destination form is opened, it will include the data from the Zingtree session in the fields that match.
Misc Notes
- Tech note: If you’re hand-coding the HTML for your forms, each form element must have a class of zt-data to be recognized and saved.