Need javascript for button to set all fields to read only with pop up prompt
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.
