Well after having a look at checkboxes Let's move on to well kind of their sibling radio buttons the
difference of course is that we may only select one radio button and a group of radio buttons.
So right now it's not working correctly.
So we want to ensure that we can only select one and then that we store the value off the select radio
button in some property.
Let's use VHS has to help us there.
Well restoring the general there so let's go down to our data field here and simply add gender here
and I'll set it to mail by default since well I am male of course.
Choose your favorite gender.
Nowadays you get a lot of options here.
So with the generous set year we want to go to the radio about this year and now the important thing
is how do we bind them again.
I set them up in a bootstrap style wrapped by a label to have the styling they do have.
But the modeless of course also added to the input again.
So we always added to the input here not to the wrapping label not to the rep and give to the input.
And here I want to bind to gender just like that.
Now I can copy this same code to my radio button doing this actually use a lot of things in the background
first.
You just now know as both radio buttons belong to the same group.
So if we saved as we can already see that I could only select one of the two.
Now because again Mujeres recognizes they're bound to the same model.
So they are a group so only one of them is selectable.
That's the first important thing.
The second important thing is that UJA as automatically stores the value of the selected radio button
devalues.
We set up here of course with the normal value attribute in our gender properties.
And I can show this by simply outputting gender here like that if I do it like this we can see that
male is selected now.
And now watch the area down there it switches to female and back back to male female back to male.
So this is how easy it is to bind radio buttons and of course you could bind more than two.
The key thing here is to use the same model which are binding and your chest will handle the rest like
grouping assigning the value correctly.
That is how we use radio buttons and their futures form and how we can use the property as we switch
between the buttons.