Can I have all radio buttons selected at the same time by default
Question
Application Type
Reactive

Hi.

I have a popup that has a radio button group and three options. Test1, Test2, Test3. 

Is it possible to have all 3 options selected by default when I open my popup?


Kind regards

Solution

If you can select multiple options, why don't you use the checkbox? 

You can have a list too of checkboxes, and any checkbox at the beginning will have is check active. If you want to click on one of them, and you want to remove the active state, you just need to loop the list and make the actives not actives, except the one that you clicked.

Kind Regards,

Márcio

Hi 

@Márcio Carvalho


Thank you for your response, requirement expect radio button instead of checkboxes. Can this only be done with checkboxes?


Kind regards

What is expected? the functionality or the styles?

For the functionality you can do as I said, you can manage on your side. For the styles you just need to put the class on the style classes, instead of a checkbox, is radio-button.

You will not be able to select all using the radio-group/radio button widget.

If you change the class, insert this CSS on your theme.

[data-checkbox]:checked:after{

display: none;

}

There is a small UI issue that can be fixed using this CSS.

Hi Veronica,

the goal of a radio button group is to choose only 1 option. For multiple choices you have checkboxes.

However if that's the way you want it, you can create a checkbox list and change the Style Class to "radio-group" to look like a radio button.

Regards

Hi.

The style is expected to look like the radiobutton. Thank you for the replies. I'll use the checkbox then have the style like the rasiobutton.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.