That script has been posted on the forum numerous times. Just search on my posts and look for a Lock Fields subject
Paul
Views
Replies
Total Likes
Thank you!
Views
Replies
Total Likes
Got it
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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!
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi Paul,
Could you send me a copy of the script as well. Thanks!
jeelee[AT]gmail.com
thanks
simjl
Views
Replies
Total Likes
Its already posted as an attachment on my Feb 11 post in this discussion thread.
Paul
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
That is a global variable that is defined in the File/Form Properties/Variables tab .....see the screen shot below:
Paul
Views
Replies
Total Likes
Please can you send me th script, I have also similar issue.
Views
Replies
Total Likes
Views
Replies
Total Likes
Simplty Print to a PDF file, and save it wherever you want.
(Select PDF) instead of your printer
Give it a location
Done
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.
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.
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
Hi,
just check this thread.
Some repies already a sample file attached you can work with.
Views
Replies
Total Likes
Haven’t been able to get it to work right.
Views
Replies
Total Likes
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...
Views
Replies
Total Likes
Views
Likes
Replies