Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Enable/Disable checkboxes based on a condition for nodes
posted

I want to enable some node checkboxes and disable checkboxes for some nodes depending on my business logic.

Could you provide me with a sample code to do this in Javascript?

Thanks

 

  • 1923
    posted

    If you have access to the node(s) you wish to change (either through an event or some other node finding method)...perhaps try the following:

    // get access to the node
    var node = igtree_getNodeById(nodeId);

    // if the node was returned...
    if (node) {

          // disable node
          node.setEnabled(false);

          // enable node
          node.setEnabled(true);

    }