Solved

In Acrobat:  How do I make a group of radio buttons only appear when a certain checkbox is checked?

Posted on 2015-02-23
1
318 Views
Last Modified: 2015-03-03
Hi fellas,

I've got an Adobe form I'm working on.  It is intended to document changes to system access (permission changes in AD, access to various financial applications, etc.).  It presents a list of systems available, and next to each one are three radio buttons named Add, Change, or Remove.  I want these radio buttons to be grayed out or invisible or otherwise inaccessible unless a checkbox next to the system name is checked.  

So in short:  When checkbox is checked, radio buttons can be selected.  When unchecked, they are inaccessible.

I figure this will involve some VBScript or JavaScript, but I have no idea (1)what the code will be and (2)how to inject the code into the PDF.
0
Comment
Question by:imtt321
1 Comment
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 40635635
There is no VBScript in Acrobat, all customization is done via JavaScript. Let's assume you have a radio button group named "Group.1" with the three options Add, Change and Remove, and a checkbox named "CheckBox.1" . Open up the field properties for your checkbox and go to the "Action" tab, then add a "Mouse Up" action of "Run a JavaScript" and use the following script:

var res = event.target.name.split('.');
var idx = 0;
if (res.length > 1) {
    idx = res[1];
}

if (event.target.value == "Off") {
    this.getField("Group." + idx).readonly = true;
}
else {
    this.getField("Group." + idx).readonly = false;
}

Open in new window


You can use the same script for each of your checkbox/group combinations, as long as they all share the same numeric extension (e.g. .1 .2 and .3).
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 109
egit plugin on eclipse 8 65
Need Nag Screen for Reboot if system up time is over 14 days 12 51
how to Classify of email (pdf attachments) 7 36
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question