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

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

New Here ,
Mar 19, 2025 Mar 19, 2025

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. 

TOPICS
PDF forms
159
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 ,
Mar 19, 2025 Mar 19, 2025

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
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
New Here ,
Mar 31, 2025 Mar 31, 2025

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
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 ,
Mar 31, 2025 Mar 31, 2025
LATEST

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

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