Using JS in Dataform

Using JS in Dataform

by James Asante -
Number of replies: 0

I am trying to use the java script function in dataform to manage four checkboxes. I want only one to be selected. I copied the script below in the JS box but does not work. Anything else I need to do?

function selectOnlyThis(id) {
    for (var i = 1;i <= 4; i++)
    {
        document.getElementById("Check" + i).checked = false;
    }
    document.getElementById(id).checked = true;
}

Average of ratings: -