How do you make a text field Read Only after it is saved and distibuted? | Community
Skip to main content
July 21, 2010
Solved

How do you make a text field Read Only after it is saved and distibuted?

  • July 21, 2010
  • 23 replies
  • 16522 views

How do you make a text field read only after it is saved and distibuted?

LiveCycle Designer ES 8.2

This JavaScript code on the exit event:

textField1.access = "readOnly";

This works after the user loses focus on the field, however after it is saved and distributed, that field is no longer "read-only".

I need to have staff insert information into a text field and then distribute it out to customers, and those fields have to be protected.

How do you do this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

No ....it must be there to be a valid schema....but it is not used by the product when offline.

Paul

23 replies

July 29, 2010

A field in the schema......i.e.

<root>

     <Field1>test</Field1>

</root>

root is a node and Field 1 is a child node of root. The value of the node Field1 is test

Paul

July 29, 2010

I will apologize in advance if this is a stupid question, but when you refer to node, what do you mean?

Eve Tracy

July 29, 2010

Chnaging the binding to the schema will affect that ....but you can bind the same node in the schema to multiple fields

so simply bind the appropriate node to each individual field.

Ultimately you have to bind each individual field (unless the structure of the schema matches the form exactly).

Paul

July 29, 2010

Morning Paul!

I am going through the XML schema tutorial on w3Schools http://www.w3schools.com/Schema/default.asp. to create the xsd file, it isn't as difficult as I thought it would be. I have the fields set correctly in the hierarchy so I will have to use the schema method to get the desired layout.

I have some concerns on binding it to the fields. Some fields have the binding set as global to populate other "read only" fields, will changing the binding to an xml schema affect the global bindings of those fields? If so, can I change the binding on the form/subforms or does it have to be on the individual fields?

Eve Tracy

July 29, 2010

The XML data will follow the structure if the form in the hierarchy view unless you import a sample XML data file or you have a schema file (XSD). Then you can force the data to follow those structures by binding the field on th eform to the appropriate node in the data/XSD file.

paul

July 27, 2010

So that will let me adjust how the form data is displayed in the xml export file?  What event would that command be on?

Right now, the fields that are on top of the form, those values appear at the bottom of the document when exported in XML..  My Oracle guys want the exported values in XML a certain way so they can import it correctly.

July 27, 2010

You will want this command:

xfa.host.exportData("", false)

This will bring up a dialog box to allow you to select a filename and it will give an XML extension (it woudl be xdp if you do not include the false at the end).

Paul

July 27, 2010

Thank you everyone for the help.  I ended up using the "secret space" method to make the text fields "Read Only" to users of the form and still giving staff the ablity to edit them.  I found this fix on forum link

http://forums.adobe.com/message/2582721#2582721 using the

SecretSpaceExample.pdf as an example.

Changing the form properties to run script Automatically fixed many of my issues.

Next - Need to figure out how to manipulate XML export data.  If anyone has a clue, I am listening.

July 26, 2010

You are changing the "state" of the form. There is a setting in the Form Properties that indicates whether you want to save thses changes automatically

or you (the Form Designer) will take care of it. Look under File/Form Properties/Defaults and make sure that the Save Scripting changes is set to Automatically.

Paul

July 22, 2010

So flattening is not the route I can take for this form, what other route would you suggest?

Eve Tracy