Expand my Community achievements bar.

Read Only fields

Avatar

Level 2

Can I assign a button that will bring up a javascript window to enter a password, to change the status of more than one field AT THE SAME TIME, from "read only" to "user entered optional", and then on saving have the same fields go back to the "read only" status?

I was playing around with some code but cant get it to work for multiple fields

var cRtn = app.response("Please Enter Password:", "Document Control Only");

     if (cRtn == "12345")

{

     this.presence = "invisible";

     xfa.host.setFocus("xfa.form.form1.TextField1");

     TextField1.access = "open";

}

also for it to revert to read only on save, Im pretty sure I will have to insert some code on the presave event...

still trying to figure out

help anyone?

1 Reply

Avatar

Former Community Member

The attached uses a button to invoke 'app.response' and set the access properties of two fields. You can toggle between read only and user entered optional. Regarding save, see http://forums.adobe.com/thread/689021?tstart=30.

Steve