How to enable a button when a count number variable reaches 5?

I have a page with 5 button selections and a counter variable gets incremented on each button click. How can I enable thenext page button only when the counter reaches 5?

Hello,

Just set the visibility of the button to a formula like this:

IF(pageVars.counter==5 , true, false)

You can set the visibility of the button in the “properties” tab under “advanced” options.
Cheers

Just dropping some extra advice here, you can actually use pageVars.counter === 5 (or >= 5 if more than 5 clicks is also okay) directly without the IF statement, since the value of that statement is already either true or false.

This will make your life easier especially with more complex formulas!

1 Like

Thank you. I see how this is a more direct way since the return value has to be either true or false.

Thanks. Very helpful. This forum is such a wonderful resource.

1 Like