How to get radio button name

I have this code:

myFirstForm.forEachItem(function(id){
    switch (myFirstForm.getItemType(id)) {
        case 'radio':
            console.log(myFirstForm.isItemChecked(id, myFirstForm.getCheckedValue(id)));
        break;
    }

This returns:

But the name of my radio buttons are ‘radioButtonNumber1’. How can I access this name?

Hi

Before form init, add:

dhtmlXForm.prototype.items.radio._getId = function(item) { return item._idd; }; dhtmlXForm.prototype.getRadioName = function(id){ return this.doWithItem(id,"_getId"); };

In script use:

var rName = myForm.getRadioName(id);

sorry,

return item._group;

instead of

return item._idd;

Thanks, that worked fine.