Hi Guys,
I need some help with this script desperately. I am using Acrobat X Professional on Mac.
Here's the situation, I have tried inserting this script on a button, it comes up with the warning window, but it doesn't lock the form from editing after I click YES. On this button I have also added a Save As command.
My PDF is 1 page and here are the fields that I have in the pdf that are named as follows:
CustomerName
Address_Line1
Address_Line2
Kitchen_Style
Deposit_1
Deposit1_Amount
Deposit_2
Deposit2_Amount
Deposit_3
Deposit3_Amount
Deposit_4
Deposit4_Amount
Save_Button
This is the script I have used.
// The following code confirms whether to Lock the form
var cMsg = "Is this form ready to be submitted? \n\n"
cMsg += "Select YES to LOCK the form.\n\n"
cMsg += "Do you want to Continue?\n\n"
var nRtn = app.alert(cMsg,1,2, "Lock Form?");
if(nRtn == 4)
{ // A Yes Answer
//Protects each field
CustomerName.access = "protected";
Address_Line1.access = "protected";
Address_Line2.access = "protected";
Kitchen_Style.access = "protected";
Deposit_1.access = "protected";
Deposit1_Amount.access = "protected";
Deposit_2.access = "protected";
Deposit2_Amount.access = "protected";
Deposit_3.access = "protected";
Deposit3_Amount.access = "protected";
Deposit_4.access = "protected";
Deposit4_Amount.access = "protected";
Save_Button.access = "protected";
}
endif;
Can somebody help me ASAP and tell what I am doing wrong??
All I want to do is make the fields uneditable/locked after I hit the button.
Thanks
Sash
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com