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

Have a form field (text box) mirror the text/data entered in another form field. (i.e. user enters column names for table on first page, then column names are displayed later in document)

New Here ,
Apr 29, 2019 Apr 29, 2019

So in a very low-level kind of way, I am trying to mimic an excel file. I want the first page of the pdf document to act as the "master data" sheet and the preceding pages will grab text and numbers from that page. I have never worked with javascripts before so the syntax is very confusing. I understand that you can create a calcuation under the "Calcuate" tab (under properties of a form field), but it only deals with numbers. Any help would be great!

TOPICS
PDF forms
3.7K
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 ,
Apr 29, 2019 Apr 29, 2019

Just give both fields the same name and they'll automatically have the same value.

And it's not true that a calculation script can only deal with numbers.

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 ,
Apr 29, 2019 Apr 29, 2019

Is there a way to edit one form field and have the other locked if they have the same name?

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 ,
Apr 29, 2019 Apr 29, 2019
LATEST

No. If you want the other field to be read-only then they need to have unique names, in which case you will need to use a calculation script. Let's say the first field is called "A" and the second "B".

You can set B as read-only and use this code as its custom calculation script:

event.value = this.getField("A").valueAsString;

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 ,
Apr 29, 2019 Apr 29, 2019

I figured that there was an easy way to do it. I do not doubt that there are a ton of capabilities of the calcuate tab, I just don't know javascript really well

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