cancel
Showing results for 
Search instead for 
Did you mean: 

Permanently Locking fields

Former Member
0 Kudos

Hi all,

I'm new to Adobe Forms and am trying to permanently lock text fields after a "Lock" button is clicked.

in my Click Event i placed the following :

data.subForm1.EMPFIRST.access = "readOnly";

data.subForm1.EMPLAST.access = "readOnly";

After the button is clicked, the text fields become un-editable which is correct, but when the Form is saved,

then re-opened, the saved values appear but are editable.

Any help would be greatly appreciated,

Miguel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try This

Create one flag for the read only mode Field_edit and assign the value during click event. In the layout ready or in form ready check the flag and assign read only.


//button click event
data.subForm1.EDITFLAG.rawValue = "X";

//in Form Ready
if(data.subForm1.EDITFLAG.rawValue == "X"){
data.subForm1.EMPFIRST.access = "readOnly";
data.subForm1.EMPLAST.access = "readOnly";
}

Kind Regards

Mukesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks guys,

Problem solved. I thought the solution involved something to do with permanently changing the XML file.

Thanks again,

Miguel

Former Member
0 Kudos

Hi,

The same code which you have placed in "Click" Event do also place it in "Form Ready" or "Initialize" Event then it will work. But place that code based on some condition otherwise your fields will become readonly.

Regards

Pradeep Goli

OttoGold
Active Contributor
0 Kudos

You can experiment with digital signatures which allow locking the fields.

Also you can try debug what happened using the postSave event for scripting.

Maybe you can try a read-only field which is read-only all the time (static from design time) which you change using script and hope the "read-only" attribute will remain unchanged.

This is what I would try. Have a nice day, Otto