Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

jeanette614
Level 4
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
Bibhu_Bikash_Na
Level 9
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.