Skip to main content
Solved

Change the button state by clicking on a different component


Hello everyone,
Since a new update has been released, I thought there might be new ways to solve this problem.
I have the following problem: I would like my button to change from “disabled” to “Default” as soon as you select one or more things from a list. Since I have over 10 options that can be selected and the option to select 1, 2, 3, 4 or all of them, the number of possible combinations increases gigantically and definitely too much work. Is there any way that as soon as an option is clicked, my “next” button changes to default without having to create a common component? (Unfortunately, I can’t upload any images because the work is not allowed to be published).
Thanks for any help

Best answer by tank666

Yes, you can achieve this with variables and advanced prototyping. For example, you can have 2 variables (number and string). The number is used to count the selected objects, and the string is used to change the variant of the button component. Then write the logic you need. For example, if more than 3 objects are selected, then set the button variable to the default value, otherwise set the disable value.

View original
This topic has been closed for comments

2 replies

tank666
  • 4868 replies
  • Answer
  • July 21, 2023

Yes, you can achieve this with variables and advanced prototyping. For example, you can have 2 variables (number and string). The number is used to count the selected objects, and the string is used to change the variant of the button component. Then write the logic you need. For example, if more than 3 objects are selected, then set the button variable to the default value, otherwise set the disable value.


  • 0 replies
  • August 22, 2023

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings