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

default value of field by variable / calculate / script

New Here ,
Jan 24, 2017 Jan 24, 2017

Please, how to specify a default value to a field using a variable / calculate / script?

TOPICS
Acrobat SDK and JavaScript , Windows
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

correct answers 1 Correct answer

Community Expert , Jan 25, 2017 Jan 25, 2017

Every field (except for buttons and signatures) has a "defaultValue" property that can be set, like this:

this.getField("Text1").defaultValue = "This is the default value of this field";

Translate
Community Expert ,
Jan 25, 2017 Jan 25, 2017

Every field (except for buttons and signatures) has a "defaultValue" property that can be set, like this:

this.getField("Text1").defaultValue = "This is the default value of this 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
New Here ,
Jan 25, 2017 Jan 25, 2017

I did not find it in the properties of the field, so I entered into Java Script document, and it works! 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
LEGEND ,
Jan 25, 2017 Jan 25, 2017

The default value entry is on the "Options" tab for the field properties pop-up window.

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 ,
Jan 26, 2017 Jan 26, 2017

But there can only enter a value, not a javascript.

20170127-083114.png

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
LEGEND ,
Jan 27, 2017 Jan 27, 2017
LATEST

In the design of PDF, the default value is a simple string. if you want a different initial value you have to set it in a script eg on document open.

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