Making fields read-only
I have the code below on a pdf form with text fields and radio buttons over multiple pages. The code makes all text fields on the current and prior pages read-only as expected. However, the radio buttons on all pages are read-only. How do I change the code to make only the radio buttons on the current and prior pages read-only.
var currentPageNum = event.target.page;
for (var i = 0; i < this.numFields; i++){
var currentField = this.getField(this.getNthFieldName(i));
if (currentField.page <= currentPageNum || currentField.type == "radiobutton"){
currentField.readonly = true;
}
}