Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Saving Fillable Form as non-fillable PDF

Avatar

Former Community Member
I need some help with LiveCycle.



I've created a form that will be sent to several people to fill out. Once they fill it out, they will need to save the form as a non-fillable file (normal PDF?) and send on to others to be read-only. The form will not come back to me.



I cannot figure out how to enable the form to be saved as a normal, non-changeable PDF.



Also, the only option seems to be that the form is returned to me. I don't want that, either.



Thank you!

Tricia
385 Replies

Avatar

Former Community Member

That script has been posted on the forum numerous times. Just search on my posts and look for a Lock Fields subject

Paul

Avatar

Level 2

Hi,

Thanks for this fine piece of work!

I do have an issue, I have some very nice forms built and I have looked over your form.  I don't know where to place the code though...I see you have a variable but I can't copy from your and paste it to mine.  I can copy the lines of code from the script editor but I'm pretty much lost after this.  I'm also in need of being able to lock the form then use my "save as" button and "print" button functionality.  These both need to remain unlocked.  I am willing to pay someone to assist me here providing this can be done.  I was thinking it might be easier to "print" to the MS XPS driver to flatten the form but I don't know how to add a button to do this.  I am unable to post my forms here due to confidentiality.

Your help and expertise is greatly appreciated Paul.

Thanks.

Avatar

Level 2

Well as luck would have it, poking around I was able to figure this out and got it working!

I owe you a beer my friend.

Thanks again!

Avatar

Level 3
Hi Paul - I have read through the posts, and have downloaded and looked at the Lock All Fields_Purchase Order pdf - but I cannot for the life of me figure out where to put the script, or how to configure the script to not lock the four buttons at the top (Save As, Email, Print and Reset). I am stuck!!
What I did was: copy your script for the variable myScriptObject, opened File-Properties-Variable and created a new variable called myScriptObject and pasted the script in. Then I created a button (bottom of form), and put in the Click event script you had for your button - saved the whole thing - and nothing happens. I am working on Livecycle Designer ES2 9.0. Your help greatly appreciated.
I sent the form itself to your gmail address.

Avatar

Level 1

Hi Paul,

Could you send me a copy of the script as well. Thanks!

jeelee[AT]gmail.com

thanks

simjl

Avatar

Former Community Member

Its already posted as an attachment on my Feb 11 post in this discussion thread.

Paul

Avatar

Former Community Member

hi paul,

can you enlighten me the fcomment object you created in the form? how to create one as well, since i couldn't copy the thing to my form.

fcomments.PNG

Avatar

Former Community Member

That is a global variable that is defined in the File/Form Properties/Variables tab .....see the screen shot below:

screen1.png

Paul

Avatar

Level 1

Please can you send me th script, I have also similar issue.

bala_21_us@yahoo.com

Avatar

Level 1

Can you please send me the script also.

bkoenig@carolinemd.org

THANKS

Avatar

Former Community Member

Simplty Print to a PDF file, and save it wherever you want.

Print

(Select PDF) instead of your printer

Give it a location

Done

Avatar

Former Community Member

Greetings all,

I realise that this post originated a long time ago, but a search indicated that many people are still having problems. I have been through all the posts and the solution is available, but to a new scripter it is a litte complex without having a simple example first.

I have a simple form with 7 fields and a Submit button. Like others I wanted to make the form Read Only before sending it via email.

The "readOnly" property can be applied to each field using the Submit button.

To do this open the Script Editor Window - <WINDOWS><SCRIPT EDITOR> at the top of the screen and set the language to "JavaScript" in the drop down box at the top right. Now click on the Submit button on the form.

Then use the drop down button beside Show to choose "preSubmit*". This sets up the top line of the script as shown below.

Now enter the lines to make each field read only. Note the exact spelling of "readOnly" - the lowercase r caught me out for a while.

readOnly.png

The preSubmit section performs the code before implimenting the SUBMIT button code.

There is one more thing left to do - thanks to Nialll in the posts - Go to <FILE><FORM PROPERTIES>and click on the <DEFAULT> tab.

defaults.png

Set the Preserve scripting changes to "Automatically" and click on OK.

Now everything should work, but to be sure chose Preview PDF tab from Designer, and also press <CTRL> J before entering anything into the form. This bit of magic opens up the Java Script Console and lets you see if there is a error when the script is run. This might be as simple as a spelling error.

The elegant solution that is described in detail in the posts of this thread describes a solution which will automatically find all fields and set them to "readOnly" but leaves the buttons active. It is a powerful and full solution that will work with multi-page forms and does not require the coder to know the field names. However, many times there are only a few fields in the form and the solution given here is quick and simple to understand.

Regards, Ian

Avatar

Level 1

Hi Paul,

   Your script is not working for me. Can you please check what am I doing wrong. I'm designing form using adobe live cycle designer 8.0 for adobe reader V7. It locks all the fileds in first instance but once I save ->close the document and open it again, it shows me all fields in editable mode. Can you please send me your mail id so that I can mail the pdf, I can't see the scope of attaching a document in this response.

Regards,

Vijay Potluri

Avatar

Level 1

Hi Paul,

   Your script is  not working for me. Can you please check what am I doing wrong. I'm  designing form using adobe live cycle designer 8.0 for adobe reader V7.  It locks all the fileds in first instance but once I save ->close the  document and open it again, it shows me all fields in editable mode.  Can you please send me your mail id so that I can mail the pdf, I can't  see the scope of attaching a document in this response.

  Your help is greatly appreciated, can you please send your email Id as soon possible.

Regards,

Vijay Potluri

Avatar

Former Community Member

There is a setting in the Form Properties that allows you to save the "state" of the form when you save it. My guess is that you have this setting setup to not save the "state". Under the File menu choose Form Properties then pick the Deafults tab. Under the "Preserve Scripting changes to form when saved" option make sure that the radiobutton for Automatic is set.

Paul

Avatar

Level 1

I am also having these same issues and need to lock my form fields after this form has been filled out.  Could I get your script so that I could implement this into my forms?

Thank you!

-Scott

S_J_987@yahoo.com

Avatar

Level 10

Hi,

just check this thread.

Some repies already a sample file attached you can work with.

Avatar

Level 1

I guess I will just have to go with the old method of printing to a PDF or password protecting the editing of the document...