Limited number of radio button to be clicked

Does anyone here have an idea how to make a set of radio buttons be checked based on the selected number? Like for example, there are 15 radio buttons and if I choose “3”, only 3 random radio buttons can only be checked in the 15 radio buttons. I just really need that kind of process in my app. Thanks in advance.

Create a variable Buttons_Checked and set it to 0.

When a user selects a button check to see how many have already been selected. If it’s less than 3 then increase Button_Checked by 1 and allow the button to be selected.

If a user deselects a button reduce the variable by 1.

This way when a user has selected 3 buttons they will not be able to select any more.


You mean, looking like this??



Can you please teach me how you did that? huhu

May be other possibilities are there but i am good with this simple way(i feel)…

Is this working or not for you?

Can someone please help me give me an idea how to unchecked the same button that I checked? Thanks in advance!

How many radio buttons you are using ?

I’m using 15 radio buttons. Then I want to have this case where after selecting, the user can still change the radio button. Like for example, I select 3 so out of 15rbs(radio buttons), I choose rb3, rb5, rb14. Then I want to change the rb5 to rb7 so I want to unchecked the rb5 so that I can checked the rb7. hehe

I am not usre how for this is possible i think. You want automatic as well as manual selection. If so it will be hard to set up blocks. Please be clear with what you want. If possible you can try to change from the above blocks…

Sorry if its making you confused. What I actually want is manual selection but limited. In this case the user can select a number of how many times the user should select just like on the example that I stated. I knew in the first place that this would be so hard that’s why I ask for help here and I’m so thankful that you shared your idea. At some point, I feel relieved. :sweat_smile:

It is not possible, Once radio button is disabled after reaching the total count then you can not enabled by uncheck. You need to use button click only to reset it. You can allow user to select as per the choice number say 3 mean he can choose upto three radio boxes but if it reaches the three thats all further change is not possible.

I guess I have to accept that haha. Btw thank you for responding and sharing your views, that is a great help for me as a beginner. :blush:

Hi again! Can I ask where did you get that block “Radio Button is checked of component…”? I can’t find that in my blocks :sweat_smile:

Any component → Any Radio Button

Thank youuu

1 Like

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