These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Need to make my form uneditable after its submitted as a pdf

clem
Registered: May 16 2008
Posts: 8

I made an editable form in LiveCycle Designer so it can be filled out and sent via email as a pdf, but I need to make it so that the recipient can not edit the form, only print it out. Any ideas on how to do this?

My Product Information:
LiveCycle Designer, Windows
Helen_Dyksley
Registered: Jun 4 2007
Posts: 27
Clem, perhaps you could add script to the Submit button that once it is clicked it will make all fields ReadOnly or Protected? If that is the case, you could also add an app alert asking to Confirm the form is ready to be submitted, because if Submit is clicked accidently, it would also lock form for submitter.
clem
Registered: May 16 2008
Posts: 8
thanks Helen, that worked!
LinzM
Registered: Aug 5 2008
Posts: 6
Hello,

I'm looking to do the same thing, however, I'm not sure how to do what you've suggested. I'm using version 8.0. I'm looking for assistance on creating/adding that script and app alert. Any help is greatly appreciated.

Thank you!
Helen_Dyksley
Registered: Jun 4 2007
Posts: 27
LinzM, this script works in Designer 7.1 - perhaps you can use in 8.

Create 3 Textfields and 1 Button. Behind the button, add the following script.

In my example I ask the question is this form ready to be submitted? If they click on Yes, it will lock (protect) TextField1 and TextField2. If you want them to be ReadOnly, change the access to "readOnly".

// 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

TextField1.access = "protected";
TextField2.access = "protected";

}
endif;

Let me know how you fare,

Helen
scottsheck
Registered: May 3 2007
Posts: 138
Has anyone written a script that can loop through all fields to set them as protected?
LinzM
Registered: Aug 5 2008
Posts: 6
Thanks Helen! What you suggested worked. I don't know what I would of done with out your help!!

ScottSheck:

I needed the same thing. What I did was got the list of all my fields, drop down and such from the Hierarchy list and added them to the list as follows:

TextField1.access = "protected";
TextField2.access = "protected";
DropDownList1.access = "protected";
DropDownList5.access = "protected";
DropDownList2.access = "protected";
TextField9.access = "protected";

I had about 20, so I'm not sure if there is a quicker way. Hope that helps a little!
scottsheck
Registered: May 3 2007
Posts: 138
I have over several hundred fields, so a loop would a better fit for me, but thanks
LinzM
Registered: Aug 5 2008
Posts: 6
oh, my method won't work. Hopefully Helen can help =)
scottsheck
Registered: May 3 2007
Posts: 138
Thanks for this code. That is the best compact code I've seen so far to loop through all pages and fields of a form.
bitshift
Registered: Sep 18 2008
Posts: 11
Im glad I found this thread. This just answered my question about how to lock a form. Instead of a submit button, Im going to be locking the form down once a specific signature is added.
emilylvaldez
Registered: Sep 19 2008
Posts: 5
HDana:

Would I use this in place of the abovementioned submit button? where would I put this? THanks!! :)
emilylvaldez
Registered: Sep 19 2008
Posts: 5
HDana:

I appreciate your help, but I tried that and I don't think it is working. Do I just paste it as you have it posted from the first // to the last }

I have tried doing this then emailing to myself to see if it is working, but when I open the emailed copy it lets me edit all the fields. I guess I could just lock the fields...Thanks so much for your quick reply though!!! :)
nirie1
Registered: Nov 12 2008
Posts: 4
I am sorry to restart this post but I have been searching and searching trying to figure out how to do this in Acrobat 9 Pro. The code above does not work. I have a form on our company Intranet we dont want staff to save the forms, most have reader not acrobat. Sometime of the forms our sales dept fills out a portion and then forwards to a customer via email or computer fax for the customer to fill in the rest. Or sales fills out the whole form and needs to send to customer via email or computer fax. Either way when they send to customer the fields they completed come up blank. If I turn on user rights(?) then they can save the form plus the form fields dont work as well (they can't just tab thru)

I have tried using the above codes but must be doing something wrong. I put in two submit buttons.

1. The first button is for sales to lock the forms they fill in and email to customer. Under the actions tab in Acro 9 I used the code above first that you input the fields name and then put in the execute a menu item for send an email.

2. The second button is for the customer to lock the forms they fill in and email to customer. Under the actions tab in Acro 9 I used the code that locks the whole page and then put in the execute a menu item for send an email.

Neither one locks anything on the form. Can someone please explain what I am doing wrong?
matrix27
Registered: May 2 2009
Posts: 9
can anybody help me with the script code that should loop through all your fields on all pages,lock them and at the same time save it in a directory? for example ill press the button that would lock all the pages and automatically save it in drive c:\mypdf\...my purpose is to integrate the locked pdf file in my vb6 program.... pls help..
web_wolf
Registered: Jan 24 2008
Posts: 39
I don't know how to tell it to save in a certain directory, but you could execute the save command after the loop in the button to prompt you.
app.execMenuItem("SaveAs");

Website Designer - Lititz, PA

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Another way, to do this:

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=19725

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

roudabush
Registered: Jun 7 2009
Posts: 5
I have an internal form that my staff needs to fill out. I then need to send it to many people outside as a report that should be a simple .pdf. not a form. How can I do this? I created a form with an email submit button for my staff, and then I have the same form without the submit button that I'd like to import the information into and then turn into a regular pdf and send out. Anyone know how to do this?
web_wolf
Registered: Jan 24 2008
Posts: 39
Roudabush,

Why can't you just lock the form and hide the submit button (after it's completed) and send that out? It's still a pdf...

Website Designer - Lititz, PA

roudabush
Registered: Jun 7 2009
Posts: 5
wow...that was way too easy...
divinelyhis
Registered: Nov 18 2010
Posts: 1
Helen_Dyksley wrote:
Clem, perhaps you could add script to the Submit button that once it is clicked it will make all fields ReadOnly or Protected? If that is the case, you could also add an app alert asking to Confirm the form is ready to be submitted, because if Submit is clicked accidently, it would also lock form for submitter.
How would you do this in acrobat 8 pro. i don't use livecycle and i have over 100 fields...is there a way to apply this to all fields on all pages at once?

i also want to:
make sure required fields are all filled out before submitting email and then lock all fields so that the one recieving the email can't accidently change what was entered and when they email it the subject line of the email is automatic, using one of the fields in my pdf?

i realize that's alot..but didnt know if you need what all i want to do at once in order to make javascript make sense? i am very new at this. just opened acrobat up for the first time 3 weeks ago. :(
RajKapoor
Registered: Feb 15 2011
Posts: 1
How would you do this in acrobat 8 pro. i don't use livecycle and i have over 100 fields...is there a way to apply this to all fields on all pages at once?

i also want to:
make sure required fields are all filled out before submitting email and then lock all fields so that the one recieving the email can't accidently change what was entered and when they email it the subject line of the email is automatic, using one of the fields in my pdf?

i realize that's alot..but didnt know if you need what all i want to do at once in order to make javascript make sense? i am very new at this. just opened acrobat up for the first time 3 weeks ago. :

Just Use this code to protect/lock a whole page of a 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

FormPage1.access = "protected";

}
endif;

Slivar
Registered: May 29 2010
Posts: 16
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 my one button, it comes up with the warning window, but it doesn't lock the form after I click YES. On this button I have also added a Save As command.

The fields I have 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 damn form secured after I hit the button.

Thanks