Highlighted

Using if Conditions in Acrobat PRO DC ( I have no previous experience with JavaScript)

New Here ,
Nov 02, 2020

Copy link to clipboard

Copied

If the answer is Yes, move to the next question.

If the answer is NO, Select one of the options A, B, C or D.
Could you please help code the above?

Thanking you for your cooperation and support!

TOPICS
Create PDFs, PDF forms

Views

47

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

Using if Conditions in Acrobat PRO DC ( I have no previous experience with JavaScript)

New Here ,
Nov 02, 2020

Copy link to clipboard

Copied

If the answer is Yes, move to the next question.

If the answer is NO, Select one of the options A, B, C or D.
Could you please help code the above?

Thanking you for your cooperation and support!

TOPICS
Create PDFs, PDF forms

Views

48

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
Nov 02, 2020 0
Adobe Community Professional ,
Nov 02, 2020

Copy link to clipboard

Copied

Please be more specific about your workflow.

 

Where is the yes or no answer retrieved from? a dropdown menu? a value from a checkbox checked or unchecked state? or from a typed-in answer in a text field?

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...
Nov 02, 2020 0
New Here ,
Nov 03, 2020

Copy link to clipboard

Copied

The yes or no is a radio button

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...
Nov 03, 2020 0
ls_rbls LATEST
Adobe Community Professional ,
Nov 03, 2020

Copy link to clipboard

Copied

Well, if I understood your intent correctly, and taking into account that you provided very little information about your workflow, this is what I came up with:

 

  • Just add the following script as mouse-up action of the "Yes" radio button
this.getField("myChoices").display = display.hidden;
this.getField("QUESTION2").setFocus();
this.resetForm(["myChoices"]);

 

  • The slide below illustrates  how the "Yes" radio button works with this script:

field-focus1.png

 

  • and add this line to the "No" radio button
this.getField("myChoices").display = display.visible;
this.getField("myChoices").setFocus();
app.alert("Please select one of the options listed in the dropdown menu", 1);

 

  • The slide below illustrates  how the "No" radio button works with this script:

field-focus2.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...
Nov 03, 2020 0