Expand my Community achievements bar.

How do I use a button to add "1" to a number?

Avatar

Level 4

I'm sure this is so simple that I'm going to be smacking my forehead when someone gives me the answer but for the life of me, I can't figure out how to do this.

I'm making a simple pdf that lists ticket prices for an event. I want the button to add one to the number of tickets ordered every time it's clicked. I need the starting value to be "0" tickets. How do I do this?

1 Reply

Avatar

Level 9

Hi,

Use a variable to strore the value. In the click event of the button increment the value. In the click event of the button, you can put the following code.

var count +=1;

Thanks,

Bibhu.