Click between the radio button and the text.But Radio button is not selected.
Application Type
Traditional Web, Mobile, Reactive, Service

Hi,


Click between the radio button and the text.

Then the onclick event is called, but the radio button is not selected.


Is this a specification?

Is it possible to make the radio button selected?



Best regards,

RadioButtonTest.oml

Solution

Yes,
It can be done by setting the variable to the radiogroup.

RadioButtonGroup variable is set only when clicking on the label or radiobutton.
You need to achieve this by clicking on the whole radiobutton. So, you need to assign it explicitly

Hope this helps!

Regards,

Ellakkiya.S

Hi Shohei Nakata,

Clicking the space between radio button and the text, radio button is not selected.

This happens because margin-left css applies for the text

Replace the margin-left css with padding left css.

[data-radio-group] label {
    padding-left:  var(--space-s);
   margin-left:0px;
}

Radiobutton selected when you clicked between the space.

Kindly refer the attached oml and URL.

Hope this helps!

Regards,

Ellakkiya.S

RadioButtonTest.oml

Thank you Ellakkiya,

It is resolved.

Regards,  

Same problem occurred.(text right side clicked)

Can you do something about it?

Regards,


Hi Shohei Nakata,

 Kindly refer the attached oml and url

Hope this helps!

Regards,

Ellakkiya.S

RadioButtonTest.oml

I ran your oml and confirmed it.

It means you have to set the Variable of RadioGroup?

 Click button 1 ⇒ Set Variable to 1 for RadioGroup.

 Click button 2 ⇒ Set Variable to 2 for RadioGroup.


Solution

Yes,
It can be done by setting the variable to the radiogroup.

RadioButtonGroup variable is set only when clicking on the label or radiobutton.
You need to achieve this by clicking on the whole radiobutton. So, you need to assign it explicitly

Hope this helps!

Regards,

Ellakkiya.S

Thank you for your help.

I understand it.

Regards,

Hi,

I'm not sure what you guys are trying to solve here ?

It is most likely that it is intentional by the designers of this widget that you have to actually choose a visible part of it (either the radio button itself or the text behind it) to select a different option.  The way you are changing it now, people might accidentally click in the whitespace behind a value, and unwantingly change the selected value.

Also, I'm guessing you have added these onclick events to each option for demonstration purposes, right? You do know there is an OnChange event already avaiable at the radiogroup level?

Dorine 

Hi,Dorine,

I want to turn on the radio button when I click on this range.

(Because the OnClick event has been fired).


I and the end users of my project can't believe that the OnClick event is fired but the radio button is not turned on.

well,

the event you would normally be using is the OnChange of the radio group, not these onclicks you have added to each item.  The firing of that event is perfectly in sync with the radiobuttons changing.

And as far as choice of widget is concerned, what you want sounds more like a button group instead of a radio group.

Dorine

button group!

I try it.

Thanks for your advice.

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