I would like to make a button in an Acrobat form that will change a field from read-only, then allow the user to change the data in the field, then make the field read-only again when they are finished. I currently have the script that will change it from read-only, but then it leaves it as read-only unless they click on the button again. I would like to eliminate the chance that they will not remember to click it the second time to change it back to read-only.
Here is my current script:
var f = this.getField("SendTo");
var cChangeContactInfo = app.alert("Do you want to edit the Send To information?\n\nClick YES to enter new contact information and then click this button again. \nClick NO to lock the contact information as read-only. \nClick CANCEL to leave it as is.",2,3,
"Change Contact Info");
if (cChangeContactInfo == 4)
{ f.readonly = false;
}
else
{
f.readonly = true;
}
Thanks for any help.
George