Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Disable fillable fields

Avatar

Avatar
Level 1
DC1977
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
DC1977
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
DC1977
Level 1

12-08-2016

Hi!

Ok here goes. I am creating a form for my company. The first few fillable fields need to be completed by my department (HR) and the other portion needs to be filled out by employees we will be emailing the form too. So on that note, is there any way to make the fields the HR department complete "read only" or at least protect them from editing after the form is saved?

These fields are date fields that are extremely important the employees are unable to change, but in turn still be able to complete the bottom fillable fields portion of the form. Thank you!

Accepted Solutions (0)

Answers (6)

Answers (6)

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

22-09-2017

BR001's response will work if you are looking to restrict data on the whole document or a page at a time. From what you said the HR department will fill out some fields and you then want to lock them. If the form is designed so that the HR section is page1 and the employee signs page 2 then you can accomplish this by using something like: xfa.resolveNode("form1.Page1").access = "protected"

This assumes your form page is labeled page one. If you did not label it and just used the default then it would be more likely: xfa.resolveNode("form1.#subform").access = "protected"

#subform would indicate the unnamed page.

Here is where it will get tricky. If HR fills out only a portion of the first page and then locks the document, then you will need to do a bit more work. You will need to determine the sections (subforms) that need to be locked. that might look something like: xfa.resolveNode("form1.Page1.Mysubform.access = "protected"

then the other thing to consider once you have this worked out is how do you unprotect it if the HR department wants to make a change. I created a lock/unlock button that uses a password to lock/unlock the form. Its very low security but it works

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

270 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

22-09-2017

Hi,

Since Reader 9 (or XFA 2.8) you can set the access property at the form level.

So something like;

form1.access = "protected"

Assuming form1 is the top node in your form.  You have to make sure the target version of Reader in LiveCycle Designer is 9.0 or greater.

Bruce

Avatar

Avatar
Level 1
rebeccal9902539
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
rebeccal9902539
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
rebeccal9902539
Level 1

22-09-2017

I have no idea how to embed code into a .pdf document to disable all of the fillable form fields.

Now that all of the items are created, and, the documents are saved - we need to disable all of the fillable forms on the entire document - how is this accomplished? There isn't a setting for the entire document? Thanks for any and all assistance!

Avatar

Avatar
Validate 1
Level 2
mattiaswallin
Level 2

Likes

11 likes

Total Posts

51 posts

Correct Reply

8 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
mattiaswallin
Level 2

Likes

11 likes

Total Posts

51 posts

Correct Reply

8 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mattiaswallin
Level 2

15-08-2016

I am not entirely sure what goes wrong for you. I just made a quick trial myself on a numerical field with one button locking it with .access = "readOnly" and then a second button that activated it once again with .access="open". And that worked perfectly.

Do you have the console open? Does it produce an error when you press that second button? In the previewer (or acrobat for that sake) you can press ctrl+j to open the console for debugging purposes.

As the syntax seems correct and my trials seem to work for me (with the same code as yours beyond the referencing) I would first suggest you to try with referencing the page with its exact path, alternatively start on a lower level trying to only lock/open separate fields within the page from the second page. However I suppose you actually should be able to lock/unlock the full page as you seem to be able lock it. (these are just the two differences I see from your issue to my trials).

Avatar

Avatar
Validate 1
Level 1
PlanetSong
Level 1

Likes

2 likes

Total Posts

39 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
PlanetSong
Level 1

Likes

2 likes

Total Posts

39 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
PlanetSong
Level 1

14-08-2016

I tried out, "disable" works by creating the Action Builder, but "enable" cannot. Am I getting anything wrong?

Capture.PNG

Button1 is clicked to disable Page1, code automatically generated by LiveCycle:

oTargetField = this.resolveNode("Page1");

  oTargetField.access = "readOnly";

However it cannot enable the form1/Page1 with another button in page 2, code automatically generated by LiveCycle is like this:

oTargetField = this.resolveNode("Page1");

  oTargetField.access = "open";

Avatar

Avatar
Validate 1
Level 2
natalies3171885
Level 2

Likes

4 likes

Total Posts

38 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 2
natalies3171885
Level 2

Likes

4 likes

Total Posts

38 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
natalies3171885
Level 2

12-08-2016

You should be able to use the Action Builder to set this up for each field you need controlled. You would create a new action, 'When XXX is changed', select the result 'enable or disable a field' and choose the same field (XXX). You might also be able to set the action to disable an entire subform, if you have a bunch of fields you need locked at the same time (you might want to put in a button for this, rather than relying on a change in a given field).

I haven't used this particular action result before, but I expect it should do what you're looking for.