• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

239

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

Community Expert , 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;

 

Votes

Translate

Translate
Community Expert ,
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;

 

Votes

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