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

How to use a dynamic text variable in a static text field in Acrobat form

Engaged ,
May 06, 2024 May 06, 2024

Hi,

I am struggling to find much in the way of useful video or document info on this topic.

Even AI seems nonplussed.

I just want to creat a form field for users to enter their name and then have that name used wherever I insert a variable name in the form's main text.

I see InCopy can do this, but the method for Acrobat seems complex and involved.

Any ideas/tutorials?

TOPICS
How to , JavaScript , Modern Acrobat , PDF , PDF forms
1.3K
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 ,
May 06, 2024 May 06, 2024

As the custom calculation script of the text field you can use something like this:

event.value = "Hello, " + this.getField("Name").valueAsString + "! How are you doing?";

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
Engaged ,
May 06, 2024 May 06, 2024

Thanks try67 but ... so static Fields have names?

Your idea seems to relate to dynamic text fields only.

I can't see any way to target or rewrite text in a static 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
Community Expert ,
May 06, 2024 May 06, 2024
LATEST

All fields have names, yes.

I have a feeling you're talking about static text, or a comment, not a "static text field", which doesn't really exist.

I assumed you were talking about a (read-only) text field with a calculated value...

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