Non-clickable button
Hey everyone , I created a variable called "counter " to which I assigned the value of my paragraph displaying the numbers . Next , I set up a "click " event on the " + " button to increase the counter by the "add " value and on the " - " button to decrease the counter by the "minus " value . Now , I want to make the " - " button non -clickable when the number reaches 0 to prevent negative numbers ( -0 , -1 , -2 . . . ) . Does anyone know the best practice to achieve this ? Thank you . set it to 'true ' when counter equals 0 @Lucas G
use the "disabled " attribute Thank you very much , Lucas , for your assistance . Could you provide more details on the configuration when the counter is equal to 0 ? Indeed , when I set the attribute to "true , " the button deactivates correctly , which is a positive outcome . However , I am encountering difficulties in performing the step to set the attribute to "true " when the counter is equal to 0 (I am unable to achieve this ) . @Andreas Møller
You an set it with a formula . Variable count equals 0 Where the click event for " + " is on the minus button and it will not go below 0 @Andreas Møller
I assume your counter looks something like this ? Thank you so much for your help . I was almost there . My mistake was not putting the value '0 ' back into the second field of 'equals . ' I truly appreciate Toddle because even though I couldn 't do it before , now that I know how to proceed , it 's really straightforward , and I really like that .






.jpeg/public)