not existing getRadio method

Hello dhtmlx users

I cannt find a method to get a radio button from existing form.
docs.dhtmlx.com/doku.php?id=dhtm … alpha_form
I’m searching for a method like getRadio or getElement or sth like this.

There are 3 radios with the same name.
How can I detect if the user changed the value of radio?
Is there a event handler to do it? I cannt find it
docs.dhtmlx.com/doku.php?id=dhtm … vents_form

The native DOM method are ugly because the radio is a bunch of many HTML elements.

Thank for your suggestions

Bartek

Hi

method to get a radio button from existing form
in form radio button not , actualy it is complex item
contain some divs, labels, image

How can I detect if the user changed the value of radio?
docs.dhtmlx.com/doku.php?id=dhtm … t_onchange
myForm.attachEvent(“onChange”, function(){
console.log(arguments);
});

if you init radios using this way:
{type: “radio”, name: “plugins”, value: “1”, checked: true},
{type: “radio”, name: “plugins”, value: “2”}

the check which is selected from a group:
myForm.getItemValue(“plugins”) will give you “1” or “2” - which is selected

to select manualy:
myForm.setItemValue(“plugins”, “1”) - will select 1st
myForm.setItemValue(“plugins”, “2”) - will select 2nd
the same will do:
myForm.checkItem(“plugins”,“1”)
myForm.checkItem(“plugins”,“2”)

to check if item selected:
myForm.isItemChecked(“plugins”,“1”) - return true/false
myForm.isItemChecked(“plugins”,“2”) - return true/false

group of radiobuttons means several radio-items with common name,
selecting one of them will unselect other

Hi Andrei

I was searching for event on radio builded from JSON. AttachEvent fixes my task.

Thanks for your fast answer. It was very helpfull.

Bartek