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

Read-only fields when CheckBox activated

xwg81
Registered: Jul 4 2008
Posts: 3

Hi

I am using Lifecycle designer 8.0 and i have some trouble with the forms.

When i check the CheckBox, its it possible to turn selected fields to read-only?
if so, is there a script? or better still, user-friendlier methods?

Thanks.

John

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This action has to be done with a script. You can use either the Mouse Up or the Change event on the check box to execute the following code:

This code sets a text field named "MyText" to readOnly or Open depending on the state of a check box.

MyText.access = this.rawValue?"readOnly":"open";

How the actual text field on your form is accessed depends on the hiearchy of your form. This code also assumes that the export values for the checkbox are set to 0 and 1 for off and on.

Watch this video on scripting on LC designer. It covers most of the things you need to worry about

https://admin.adobe.acrobat.com/_a200985228/p87746471/

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script