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

Select a Radio button Based on another Field

New Here ,
Aug 27, 2021 Aug 27, 2021

Copy link to clipboard

Copied

Hello. I am looking to have a field filled in with a line of text. Based on the respose given in that field have a radio button checked. For example If "Field 1" has "Before" or "After" in it, it will select "Group 1" > "Selection 1" marked, If "Field 1" has "No" in it, it will select "Group 1" > "Selection 2" Marked. I know how to do this with a check box, but not a radio button. 

 

this.getField("Check Box 1").checkThisBox(0, event.value=="Answer 1");

 

 

TOPICS
How to , JavaScript , PDF forms

Views

1.2K

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 , Aug 27, 2021 Aug 27, 2021

You can use like this at text field validation:

if( event.value == "Answer 1")this.getField("Group1").value = "Choice1";

Change radio button name and choices in script to your actual names.

 

Votes

Translate

Translate
Community Expert ,
Aug 27, 2021 Aug 27, 2021

Copy link to clipboard

Copied

You can use like this at text field validation:

if( event.value == "Answer 1")this.getField("Group1").value = "Choice1";

Change radio button name and choices in script to your actual names.

 

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
Community Expert ,
Aug 27, 2021 Aug 27, 2021

Copy link to clipboard

Copied

Do you want to check for the exact values "Before" or "After", or if they appear anywhere in the text?

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
New Here ,
Aug 27, 2021 Aug 27, 2021

Copy link to clipboard

Copied

LATEST

Long story, but I will try to be brief. Our office people are using a site that has several drop down menues and text fields they are filling in. The Form is uploaded on the site and fields are being filled in based on there responses. I then DL the form, and have to fill out the rest. I can not change the way the form looks (IE changing the radio buttons to a text field or drop down), so I am creating text fields that are hidden to fill in radio and check boxes. I am able to modify the site so when I am using it to trigger a box or radiom that it is a drop down so it will be exact. Most of the Text fields are things like permit no. that are not triggering anything just filling in the box. 

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