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

I have two different text boxes which merge into one, but secondary box can't update

New Here ,
Jun 02, 2025 Jun 02, 2025

I'm trying to have space to enter information into two text fields ("First" and "Last") which then merges those into one field ("FullName") on a PDF document. I can get the information to load in when I first enter it, but then when I go back to try and change the original boxes the "FullName" box won't update.

 

Here is the JavaScript I've been using:

event.value = this.getField("First").value + " " + this.getField("Last").value;

 

Any help is appreciated!

TOPICS
General troubleshooting , JavaScript , Modern Acrobat , PDF , PDF forms
342
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 ,
Jun 02, 2025 Jun 02, 2025

If your script is a calculation script in the FullName field, it should work.  If it doesn't work you probably have errors somewhere in the form.  Check the console.

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 ,
Jun 03, 2025 Jun 03, 2025

Hi @visual_worldview7751 ,

 

As @PDF Automation Station suggested, where exactly are you executing the script from?

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 ,
Jun 03, 2025 Jun 03, 2025

It is in the format tab with the category set to custom. Then it's just in the custom format script section.ScreenshotHelp.jpg

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 ,
Jun 03, 2025 Jun 03, 2025

You misunderstand what a format script is.  It should be in the calculation tab under custom calculation script.

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 ,
Jun 03, 2025 Jun 03, 2025
LATEST

PDF Automation Station is right, you should read this tuto: https://www.pdfscripting.com/public/PDF-Form-Scripting.cfm


Acrobate du PDF, InDesigner et Photoshopographe
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