Making radio buttons make a single feild required depending on selection

New Here ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Hello Everyone, 

I am trying to use 4 radio buttons, but have only two make a text field required. Here is an example:

-Class A  O (radio button)

-Class B  O (radio button)

-Class C  O (radio button)

-Class D  O (radio button)

Supportive Documentation [_________________] (Text Feild )

 

Only one of the options: Class A, B, C, or D can be selected. If A or B is selected, the "Supportive Documentation" field SHOULD be required. If C or D is selected, the "Supportive Documentation" field should NOT be required. 

 

Any help at all would be greatly appreciated.

TOPICS
Edit and convert PDFs, How to, JavaScript, PDF forms

Views

34

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
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Mar 02, 2021 Mar 02, 2021
Very quick and easy: In the A and B radio buttons properties "Actions" tab, place the following line of script: this.getField("Supportive Documentation").rewuired = true; And in the C and D radio buttons use instead: this.getField("Supportive Documentation").required = false;

Likes

Translate

Translate
Adobe Community Professional ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

LATEST

Very quick and easy:

 

In the A and B radio buttons properties "Actions" tab, place the following line of script:

 

this.getField("Supportive Documentation").rewuired = true;

 

And in the C and D radio buttons use instead:

 

this.getField("Supportive Documentation").required = false;

 

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
community guidelines