Board Thread:The Last Sovereign Discussion/@comment-31632839-20170920202133/@comment-31632839-20190604204434

I had a quick look into it and there isn't a build-in way to do what you want to do.

But you should be able to achieve want you want with a little change.

Add a new property to the Objects in the Array "extraOptions" (to the objects that need them anyways, as you need to deal with objects without the extra property for backward compatibility) which will be a function that returns true for displaying the option (or to be more precise, adding the options to the html page) or false for ignoring the option.

You can use the "getCheckboxStatus(checkboxID)" Function to check if a checkbox is checked.

Next you change the function "setupSectionExtraOptions" to check the property the added property "condition"(condition doesn't exits or evaluates to true if it's exists => add the option to HTML, if it's exists and evaluates to false => do nothing).

Following are the modified "setupSectionExtraOptions" function and a example for a option.

It's not as elegant as I'd like it to be, but it will do. (I guess, I hadn't had time to test it).

function setupSectionExtraOptions(sectionIndex){ var container = document.createElement('section'); container.setAttribute('class','extraOptions'); for(var i=0;i 1){ container.appendChild(appendExtraOptionDropDown( extraOptions[i].id, extraOptions[i].name, extraOptions[i].options, extraOptions[i].defaultSelected)); }        }      }   }   return container; } var extraOptions = [ {   sectionID:'chapter1', id:'firstCheckBox', name:'First Checkbox should be always displayed', impactType:'return', impactTime:'chapter1', defaultChecked:false, options:[ {impact: 25000}], condition: function{return true;} }, {   sectionID:'chapter2', id:'secondCheckBox', name:'First Checkbox should be always displayed', impactType:'return', impactTime:'chapter1', defaultChecked:false, options:[ {impact: 25000}], condition: function{return !getCheckboxStatus(firstCheckBox);} }, {   sectionID:'chapter3', id:'thirdCheckBox', name:'First Checkbox should be always displayed', impactType:'return', impactTime:'chapter1', defaultChecked:false, options:[ {impact: 25000}], condition: function{ return !getCheckboxStatus(firstCheckBox) && !getCheckboxStatus(secondCheckBox);} }];

EDIT: P.S.: Am I the only one who always has trouble with formating their posts on here? >.<