Copy link to clipboard
Copied
Hi,
As a newbie, I'm stuck.
This is as far as I could get in setting up a "Done" button to lock all the fields as read only.
for (var i = 0; i < this.numFields; i++)
{
if (app.alert({nType:2,nIcon:2,cMsg:"This will lock the document for printing and email submission. Are you sure you want to continue?"})==4)
{
this.getField(getNthFieldName(i)).readonly=true;
}
else
{
}}
The pop up works, but the script hangs up at the pop up window and I have to Force Quit the app. I can get the fields to set to read only without the pop up, however the folks using this form will need to understand the consquences. of selecting the "Done" button.
Copy link to clipboard
Copied
Move the if before the for.
Copy link to clipboard
Copied
Thank you Bernd! Sadly, as a newbie, simply moving the "if" before the "for" results in a snytax error I cannot resolve.
Copy link to clipboard
Copied
Considered your suggestion in a broader sense, then moved the script around a bit (logically) and bingo!
Thank you!