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

flatten dynamic pdf so fields are not editable

Avatar

Avatar
Boost 1
Level 1
canonpix
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
canonpix
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
canonpix
Level 1

04-10-2016

I've used LiveCycle to create dynamic evaluation forms which are to be filled out by evaluators who only have Adobe Reader. After creating the original dynamic form in LiveCycle, they were opened and re-saved in Adobe Pro DC > Save As Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save) so the entered data can be saved in a completed form.

Is there a way to flatten the dynamic forms so data in fields is not able to be edited once the forms are completed by evaluators so the completed forms can be emailed to other people and not be changed?

Accepted Solutions (0)

Answers (7)

Answers (7)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

30-11-2017

Just add another expression for checkButtons.

function lockFields(oNode) {

    if (oNode.className === "field" || oNode.className === "subform") {

          // Protect all fields

          if (oNode.access != "protected") {

              oNode.access = "protected";

            }

          // Make all buttons and check buttons invisible

          if (oNode.className === "field" && oNode.ui) {

              if (oNode.ui.oneOfChild.className === "button" || oNode.ui.oneOfChild.className === "checkButton" ) {

                    oNode.presence = "invisible";

              }

          }

    }

    for (var i = 0; i < oNode.nodes.length; i += 1) {

        lockFields(oNode.nodes.item(i));

    }

  };

//Call funtion to lock fields

lockFields(xfa.form);

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

17-10-2016

Add a button and paste this script into its click event.

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

05-10-2016

You cannot really flatten an XFA form except you print it as a PDF. But you can lock the form fields trough a script.

function lockFields(oNode) {

     if (oNode.className === "field" || oNode.className === "subform") {

          // Protect all fields

          if (oNode.access != "protected") {

               oNode.access = "protected";

            }

          // Make all buttons invisible

          if (oNode.className === "field" && oNode.ui) {

               if (oNode.ui.oneOfChild.className === "button") {

                    oNode.presence = "invisible";

               }

          }

     }

     for (var i = 0; i < oNode.nodes.length; i += 1) {

         lockFields(oNode.nodes.item(i));

     }

  };

//Call funtion to lock fields

lockFields(xfa.form);

Avatar

Avatar
Level 1
katien53020900
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
katien53020900
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
katien53020900
Level 1

04-12-2017

This worked great! I thought I had tried the "checkButton" but I think I was just off in my syntax. Thank you for your help!!!

Avatar

Avatar
Level 1
plc-ZRQSlR
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
plc-ZRQSlR
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
plc-ZRQSlR
Level 1

29-11-2017

Do you happen to know if there's way to hide all the radio buttons similar to how you hid the regular buttons in your script above?

Avatar

Avatar
Boost 1
Level 1
canonpix
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
canonpix
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
canonpix
Level 1

19-10-2016

Many thanks...we'll give this a try!

Avatar

Avatar
Boost 1
Level 1
canonpix
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
canonpix
Level 1

Likes

2 likes

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
canonpix
Level 1

13-10-2016

Thank you...one step closer!

As a newbie (with knowledgeable tech backup, thank goodness) I need to ask :

1) Where do we add the script

2) is it executed on Save

Sure appreciate that you are sharing your knowledge.