Skip to main content
Participant
Mar 19, 2025 4:14 PM UTC
Question

JavaScript in PDF Fillable Form to auto-populate a field based on ONE choice from radio button list

I am new to JavaScript. However, I've worked with fillable pdf forms. Can someone provide JavaScript code that will perform the following function within the form:

The form user will make one choice from Classification Area (5 selections: Student Development; Interagency Collaboration; Student-Focused Planning; Program Structure; Family Involvement). Based on the selection from these areas, a Heading field will be auto-populated on page 2 of the form. 

Also, I need to allow for multiple line entries in several fields in various fields of this form that might mean that the information will need to extend and add pages as the user types in requested information. 

3 replies

Participant
Mar 31, 2025 4:03 PM UTC

I'm checking back in. I've worked with what was provided on March 19th. I've still not able to see the function that I need. I'm asking for a bit more instruction as to where this script should be entered (the auto-pop field or radio buttons). Thank you.

Translate
PDF Automation Station
Community Expert
Community Expert
Mar 31, 2025 4:23 PM UTC

"enter the following calculation script in the heading text field"

Translate
PDF Automation Station
Community Expert
Community Expert
Mar 19, 2025 4:26 PM UTC

Set the export values ("choices" for radio buttons) to the heading text (Student Development, Interagency Collaboration, Student-Focused Planning, Program Structure, Family Involvement) and enter the following calculation script in the heading text field:

this.getField("Radio1").value=="Off"?event.value="":event.value=this.getField("Radio1").value;

Change the name of Radio1 to the actual radio button group field name.

You can't expand pages as the user types with an Acro Form (PDF form created with Adobe Acrobat).

Translate