To make gathering data from end-users as convenient as possible, Zingtree lets you assign text or numeric values to variables when buttons are clicked from any node. These are known as Button Click Variables. Here's how it works:
- Edit the node where you want to set up a button click variable.
- Check Assign Button Click Variable.
- Enter the variable name.
- In the right column, enter the values to assign the variable for each button option.
Here's an example:
In the above configuration, the variable time_of_day will be set to "morning" if the first button is clicked, "afternoon" if the second button is clicked, and "night" if the last button is clicked.
Using Multiple Button Click Variables
You can have more than one variable set as a button click variable. Here's how:
- For the variable name, enter multiple variables separated by a |.
- For the values, separate them with | as well.
Button click variables can contain other variables. For the above example, the score/value could contain this:
morning at #time#
And the value of time would be inserted into the variable.