Increment Value with Button Click

I have a number input field. I also have a button. When the button is clicked, I want the input field to go up by 1. So now it is 0. If I hit the button 3 times, then the value should show 3.

On the button, I put a dynamic event -> Mouse -> OnClick.
So it says: dmx-on:click=“form1.input1.setValue(+ 1)”

This works the first time, but not after that. It stays 1.

If I try form1.input1.setValue(input1.value + 1) it concatenates the 1s.
form1.input1.setValue(input1.value.toNumber() + 1) just sets it to 1 when you click but doesn’t go any higher.

Any ideas on what my blind brain isn’t realizing here?

Community Page
Last updated: