Skip to main content
Participant
May 31, 2023
Question

From - How can I link a Checkbox to input fields (multiple)?

  • May 31, 2023
  • 2 replies
  • 322 views

Hello, 

 

I am re-creating a form and need to link entry fields to a checkbox so that these fields only activate when the corresponding checkbox is selected by the user.  Can you please help? 

 

Thank you, 

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
May 31, 2023

By "activated", I'm assuming you mean enabling/disabling a field. 

 

One technique is to hide/show fields.

Here's an article on hiding and showing fields. 

https://www.pdfscripting.com/public/Hiding-and-Showing-Form-Fields.cfm?sd=40

 

It includes an example using a checkbox. The exact same technique can be used to enable/disable fields with the "readonly" field property.  Which is a much simpler version of enabling/disabling.

 

If you want to get fancy. Here's an article on creating a "disabled" appearance.

https://acrobatusers.com/tutorials/js_disabling_fields/

 

Another simple way to create a disabled appearance is to cover the field(s) with a gray rectangle annotation.

 

   

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Meenakshi_Negi
Legend
May 31, 2023

Hi Ayush29966864hyux,

 

Thank you for reaching out.

 

If creating the Acrobat Sign, refer to the following help document to set form field conditions: https://helpx.adobe.com/sign/using/form-field-conditions-settings.html

For the Acrobat form, refer to the information provided in the following community discussion on a similar topic: https://community.adobe.com/t5/acrobat-discussions/is-there-a-way-to-make-a-text-field-required-if-a-check-box-is-clicked/td-p/9284750

Hope the information helps.

 

Thanks,

Meenakshi