I have a checkbox with 6 options i want to enable my button only if all options

I have a checkbox with 6 options i want to enable my button only if all options are selected. how i can achieve this with 7.3 version.

i tried old JS syntext (window.FormAPI.getValue("myFieldId").id;) but seems like its not working anymore.....

OriginalPostID-94037

OriginalPostID-94037

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    You can check the length of the checkbox values and show/hide the button accordingly.
    You can get the length of the check box using split function.
    Here is the sample code
    function checkBox(checkBoxID,buttonID)
    {
    var checkBoxValue =FormAPI.getValue(checkBoxID).id;
    var checkBoxLength=split(checkBoxValue,";").length;
    var checkBoxValueArray = checkBoxValue.split(_AE.uiDelimiter);
    FormAPI.hide(buttonID);
    if(checkBoxValueArray.length==checkBoxLength)
    {
    FormAPI.show(buttonID);
    }
    else
    {
    FormAPI.hide(buttonID);
    }
    }
Reply
  • Hi,
    You can check the length of the checkbox values and show/hide the button accordingly.
    You can get the length of the check box using split function.
    Here is the sample code
    function checkBox(checkBoxID,buttonID)
    {
    var checkBoxValue =FormAPI.getValue(checkBoxID).id;
    var checkBoxLength=split(checkBoxValue,";").length;
    var checkBoxValueArray = checkBoxValue.split(_AE.uiDelimiter);
    FormAPI.hide(buttonID);
    if(checkBoxValueArray.length==checkBoxLength)
    {
    FormAPI.show(buttonID);
    }
    else
    {
    FormAPI.hide(buttonID);
    }
    }
Children
No Data