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:

2022-04-27_19-48-23.png

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 |.
    Example:
    name|company
  • For the values, separate them with | as well.
    Example:
    Bill|Zingtree


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 1 found this helpful

Have more questions? Submit a request

Didn't find what you need?

Our friendly customer support team is here to help

Submit a Ticket

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community