Skip to main content
Inspiring
October 8, 2024
Question

How to have a checkbox automatically populate other specific boxes.

  • October 8, 2024
  • 2 replies
  • 3426 views

Hi 

I am new to creating forms but I am trying to edit a form we currently use so that if I check that specific box then certain boxes (yes boxes on the form) will automatically  check when the first box at top of form is checked. Would this be possible 

 

For example the box at the top is all clear and if that one is checked yes then all other yes boxes to be checked automatically.  

 

Thank you for any help. 

This topic has been closed for replies.

2 replies

John T Smith
Community Expert
Community Expert
October 8, 2024

You need to ask program questions in the forum for the program you are using
To ask in the forum for your program please start at https://community.adobe.com/
Moving from Using the Community (which is about the forums) to the correct forum

Inspiring
October 8, 2024

Hi 

I am new to creating forms but I am trying to edit a form we currently use so that if I check that specific box then certain boxes (yes boxes on the form) will automatically  check when the first box at top of form is checked. Would this be possible 

 

For example the box at the top is all clear and if that one is checked yes then all other yes boxes to be checked automatically.  

 

Thank you for any help. 

PDF Automation Station
Community Expert
Community Expert
October 8, 2024

Copy the check box fields so they have the same name same export value.  You can copy the fields in form editing mode by selecting the field, then pressing Ctrl + c (copy), the Ctrl +v (paste).

Nesa Nurani
Community Expert
Community Expert
October 8, 2024

OK.  You won't be able to copy the fields as a described.  They need to have different names.  What is the export value of the Yes boxes, "Yes"?  If so, create Mouse Up action in the Actions tab of the AllClear check box, and select "Run a JavaScript".  Then enter the following script:

if(event.target.value=="Yes")

{

this.getField("Checkbox 1").value="Yes";

this.getField("Checkbox 2").value = "Yes;

//etc.

}

 

Replace Checkbox 1 and Checkbox 2 with the actual field names.


If not sure about export values, it is better to check that checkbox is not "Off" or use 'isBoxChecked()'

if(event.target.value != "Off")

if(event.target.isBoxChecked(0))

and to check checkbox you can use

this.getField("Checkbox 1").checkThisBox(0,true);