I have a custom widget "MyWidget" with three radion buttons. I would like to be the same "group". If I set the "name" attribute in the radioobuttons in the template file, then the problem is that I create "MyWidget widgets" repeatedly, then all the radio cells use the same group.
I tried putting the "name" of the switch using
radioWifget.set('name', some_value)
without success, and go directly to the DOM code with:
dojo.query("INPUT[type='radio']", this.domNode).forEach( dojo.hitch(this, function(inputNode){ inputNode.name = 'perill_'+this.id; }));
The second form sets the name attrbitue, but does not work as a group.
Any help.
Thanks in advance.
I apologize because I found the answer myself.
I will risk that someone will vote negatively for me, but would prefer to put a decision here, because maybe it can help someone other than me.
The solution is the switches in the "MyWidget" template, which should be enclosed in the "dijit.form.Form" widget. Thus, each βMyWidgetβ will have its own groups of radio volumes.
Ericsononon
source share