Clear button for specific checkboxes in a form
Hello.
I am new to Javascript in PDF documents.
I have a form with multiple checkboxes set in specific areas.
I created a button that I want to uncheck all buttons in a specific area.
I named the buttons "Potential#0-4" (Potential1, Potential2, etc.).
I found a javascript that I wanted to change all Checkboxes to "unchecked" when clicked (mouse up), but when I press the button, nothing happens:
function unCheckAll () {
var oAll = this.getField("Potential");
var aAll = oAll.getArray();
for(var i = 0; i < aAll.length; i++)
{
aAll.value = "Off";
}
}
unCheckAll();How can I make the button uncheck all checkboxes with "Potential" in their name?
Thank you!
