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

checkbox tick when a radiobutton is selected. when checkbox gets unticked, all radio buttons clear

Community Beginner ,
Sep 28, 2020 Sep 28, 2020

Hi all,

I'm creating a PDF and it's my first.

I have some programming experience but haven't mastered the Adobe javascript language yet so would appreciate a nudge in the right direction.

 

I have a pdf form where I can select 1 our of 4 radio buttons. If one of the radio buttons is selected, a checkbox should become ticked automatically.
When I unselect/untick the checkbox, all radio buttons should erase.

Any ideas...

Thx

TOPICS
Create PDFs , Edit and convert PDFs , PDF forms
2.6K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Sep 28, 2020 Sep 28, 2020

To check checkbox with radio Button use this code as MouseUp event of radio Button:
this.getField("CheckBox1").value = "Yes";
("Yes" being checkbox export value)

To uncheck Radio Buttons use this code as MouseUp event of checkbox:
if(event.target.value == "Off"){
this.getField("Radio Button1").value = "Off"
this.getField("Radio Button2").value = "Off";} //...etc

View solution in original post

Translate
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 ,
Sep 28, 2020 Sep 28, 2020

To check checkbox with radio Button use this code as MouseUp event of radio Button:
this.getField("CheckBox1").value = "Yes";
("Yes" being checkbox export value)

To uncheck Radio Buttons use this code as MouseUp event of checkbox:
if(event.target.value == "Off"){
this.getField("Radio Button1").value = "Off"
this.getField("Radio Button2").value = "Off";} //...etc

Translate
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 Beginner ,
Sep 28, 2020 Sep 28, 2020

That works perfect, thx !!

Translate
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 Beginner ,
Sep 29, 2020 Sep 29, 2020
LATEST

I have a few identical PDF's. Is it possible to copy checkboxes + radiobuttons + textboxes all in one go to another pdf?

Translate
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