HI,
I have 5 widgets in a tab.
1. checkbox
2. radio
3. textfield
4. pathfield
5. multifield
if you check 1, the 4 below will be disabled, if unchecked , the 4 below will b enabled
if 1st option(link) of the radio is selected , the multifield will be disabled, if 2nd(dropdown) is selected, the pathfield will be disabled
Below are the listeners i initially implemented
Listener for checkbox
selectionchanged :
function(box,value,isChecked) {
var dlg = box.findParentByType("dialog");
var radio = dlg.findById("dropdownToggle1");
var textfield = dlg.findById("pimaryNavigationButtonText1");
var pathfield = dlg.findById("primaryNavigationButtonLink1");
var multifield = dlg.findById("navigationSection1");
isChecked ? radio.disable() : radio.enable();
isChecked ? textfield.disable() : textfield.enable();
isChecked ? pathfield.disable() : pathfield.enable();
isChecked ? multifield.disable() : multifield.enable();
}
Radio listener
selectionchanged:
function(box,value) {
var dlg = box.findParentByType("dialog");
var pathfield = dlg.findById("primaryNavigationButtonLink1");
var multifield = dlg.findById("navigationSection1");
if(value=='link'){
pathfield.enable();
multifield.disable();
}
else{
pathfield.disable();
multifield.enable();
}
}
The problem is that after authoring the fields, when you next change the selection of checkbox, all the four fields are enabled and not the fields according to the radio listener.