Skip to content
Advertisement

How can I use multiple b-form-radio-group avoiding visual interference among them?

I’m new using Vue and specifically Bootstrap Vue and I’m trying to build a form with multiple radio groups.

My problem is that when I change the value in one of them the others don’t change their values (this was checked with Vue DevTools) but visually it looks like none of the values are selected

I don’t know what is wrong with my approach

I post here a simplified version of the code looking for some help, thanks in advance:

JavaScript

Advertisement

Answer

Since both <b-form-radio-group> elements have the same name, “radio-options”, visually they are treated like one group. The different v-model would still function correctly but this isn’t what you want visually. Give the second group a different name:

JavaScript

Here I changed it to radio-options2.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement