How can I assign a value to the radiobuttons?

The "value" field in the radiobuttons is disabled and can not be assigned a value, so it is not possible that the user can assign a custom value when the radiobutton is selected, as you can do with the checkboxes for example.

Currently when you get the value of a group of radiobuttons it simply adds "0", "1", "2", etc. to the name of the radiobutton, so it is very complicated to know which radiobutton has been selected and does not allow the user to assign a custom value.

For example:

https://stackblitz.com/edit/djrmdn?file=index.html,index.js

Add three radiobuttons with the same name "radios", as in the following image.



If you click on the button "Get value radiobuttons", the console displays the value obtained: "radios0", "radios1" or "radios2".

Is there the possibility of being able to assign a custom value to the "value" field of the radiobutton and when you get the value of that group of radiobuttons get the custom value of the selected radiobutton? it would be very useful.

Thank you very much!


5 Replies

CK Chinnamunia Karthik Chinna Thambi Syncfusion Team January 20, 2023 03:01 PM UTC

Currently, there is no support for assigning the values for the radio button. We have logged this as a feature request as "Enable the value property on checkbox and radio button". We will implement this feature in our upcoming 2023 volume 1 release and let you know once this feature is implemented. You can track the status using the below feedback link.


Feedback link:  Enable the value property on checkbox and radio button | Feature Feedback



PA Pere Argelich Romà replied to Chinnamunia Karthik Chinna Thambi January 20, 2023 03:07 PM UTC

Thank you!



PA Pere Argelich Romà March 16, 2023 07:42 AM UTC

When will this bug be fixed? I would need to be able to create radiobuttons where I can assign a value to each radiobutton and then get the value of the selected option.

Thank you.



CK Chinnamunia Karthik Chinna Thambi Syncfusion Team March 17, 2023 01:07 PM UTC

We apologize that the feature is not implemented in our Volume 1, 2023 Main release. Due to various priorities in our roadmap and other commitments we couldn’t implement as informed. However, we will implement this feature in our upcoming Volume 1, 2023 SP release expected to be rolled out in the mid of May 2023.

Appreciate your patience.



PA Pere Argelich Romà replied to Chinnamunia Karthik Chinna Thambi March 17, 2023 01:08 PM UTC

Ok, thank you!


Loader.
Up arrow icon