Button Click Variables

  • Updated

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:

  1. Edit the node where you want to set up a button click variable.
  2. Check Assign Button Click Variable.
  3. Enter the variable name.
  4. 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.

Bonus: Variables-in-Variables

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.


Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request