Highlighted

Can you restrict changes to auto populated answers?

Community Beginner ,
Aug 25, 2020

Copy link to clipboard

Copied

I have a four page document, my third page is a form that is created by selections made in pages 1-2. Is there a way to lock the third page or put it as read only? I tried locking and putting read only on the selections, but because they are copied to fill those selections, it blocks from entering the selections in the first two pages.  Would I do a script to lock each pre-populated selection on the third page or is there another way.

TOPICS
Acrobat SDK and JavaScript, PDF forms

Views

56

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Can you restrict changes to auto populated answers?

Community Beginner ,
Aug 25, 2020

Copy link to clipboard

Copied

I have a four page document, my third page is a form that is created by selections made in pages 1-2. Is there a way to lock the third page or put it as read only? I tried locking and putting read only on the selections, but because they are copied to fill those selections, it blocks from entering the selections in the first two pages.  Would I do a script to lock each pre-populated selection on the third page or is there another way.

TOPICS
Acrobat SDK and JavaScript, PDF forms

Views

57

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 25, 2020 0
Adobe Community Professional ,
Aug 26, 2020

Copy link to clipboard

Copied

Change the names of the fields on the third page. And set the values of this fields with Javascript.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2020 0
Community Beginner ,
Aug 26, 2020

Copy link to clipboard

Copied

I'm not that familiar with writing script for Java script, so I did a "copy/paste" scenario on the third page. Any help on helping me write a script to show that info on the third page? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2020 0
Community Beginner ,
Aug 26, 2020

Copy link to clipboard

Copied

Also I had to do a whole different setup to copy over the radio buttons to the third page. I currently have it set up this way:

Text fields: Copied/pasted

Checkbox fields: Copied/pasted 

Radio Button fields: 

Jessica5D1E_0-1598442660675.png

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2020 0
Adobe Community Professional ,
Aug 26, 2020

Copy link to clipboard

Copied

At the calculation of the feild copy you can use:

event.value = this.getField("field name").value;

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2020 0
Community Beginner ,
Aug 26, 2020

Copy link to clipboard

Copied

Thanks. That worked on the text option, but doesn't have a "calculate" field for radio buttons or checkmarks. Those are still able to be changed on the third page. Is there a trick like that for the radio button and checkmarks?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2020 0
Engaged ,
Aug 26, 2020

Copy link to clipboard

Copied

For Radio Buttons, put as "Mouse Up" event of Rbutton on page 1 or 2:
if(event.target.value != "Off"){
this.getField("Name of Radiobutton on Page3").checkThisBox(0,true);
}
Radio Button on page 3 need to have diff name then those on page1,2.
(Also use reset form to reset radio buttons if needed)

For Checkboxes, put as "Mouse Up" event of Checkboxes on page 1 or 2:
if(event.target.value != "Off"){
this.getField("Name of Checkbox on page 3").checkThisBox(0,true);
}else if(event.target.value == "Off"){
this.getField("Name of Checkbox on page 3").checkThisBox(0,false);
}

For textfields: use this on textfield on page 3 as "Custom calculation script":
event.value = this.getField("Name of textfield on page 1 or 2").value;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2020 0
Community Beginner ,
Aug 26, 2020

Copy link to clipboard

Copied

Both text and checkboxes worked. But the radio buttons still won't work. This is what I put in page 1-2, Mouse up, run javascript: 

 

if(event.target.value != "Off"){
this.getField("Presenter Info: Chat (Text)").checkThisBox(0,true);
}

 

but when I select it on page 1-2 it doesn't fill in for page 3 at all. Am I missing something?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2020 0