Skip to main content
Solved

How to add selection counter, and activate the 'Next' button when 5 options are selected?

  • January 16, 2024
  • 4 replies
  • 1015 views

Ulfa

Hi. I want user to be able to see how many options they already selected, and activate the ‘Next’ button once they selected five options. Can anyone point out how to do this?

The screenshot of the screen is as follow:

Best answer by Raphael_M

Hi, Ulfa.

If you want to do it like that, you need to use conditional and variables.

Here is a brief guide for it:

  1. Create 2 variables:
    a. Bolean Variable
    image
    b. Number Variable
    image

  2. Separate the string on the [1 selected] into [Count + Selected] and apply the variable count into the Count.
    image

  3. Apply the boolean variable on the instance of the button component.
    image

  4. On the Radio Button Component, add a click event on the unchecked radio button variant:
    image

5.and add this event on the checked radio button variant
image

After doing this, the prototype should be like this:

View original

4 replies

Raphael_M
  • Active Member
  • 311 replies
  • Answer
  • January 16, 2024

Hi, Ulfa.

If you want to do it like that, you need to use conditional and variables.

Here is a brief guide for it:

  1. Create 2 variables:
    a. Bolean Variable
    image
    b. Number Variable
    image

  2. Separate the string on the [1 selected] into [Count + Selected] and apply the variable count into the Count.
    image

  3. Apply the boolean variable on the instance of the button component.
    image

  4. On the Radio Button Component, add a click event on the unchecked radio button variant:
    image

5.and add this event on the checked radio button variant
image

After doing this, the prototype should be like this:


Ulfa
  • Author
  • 6 replies
  • January 16, 2024

Thank you for the walkthrough, thats definitely helpful. I managed to make the selection counter, but I still have not succeed yet in making the button activated after 5 selection. Weirdly my Boolean variable looks like this?

Do you mind sharing the file you did with me? Thanks so much!


Ulfa
  • Author
  • 6 replies
  • January 16, 2024

Ahhh I just managed to do it! I didn’t set my Boolean variables properly. Mine was set to “Yes”/“No”, but the boolean variable is usually “True”/“False” so had to correct that one.

Thanks so much Raphael, soo happy! 😁


Raphael_M
  • Active Member
  • 311 replies
  • January 17, 2024

Sorry, I was out last night. But, looks like you manage to do it just fine 😀
Happy to help!


Reply


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