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

copy information from one field to another automatically

Community Beginner ,
Feb 10, 2019 Feb 10, 2019

This is fairly a simple question.  I have a fillable form which requires you to enter the same amount in two fields. Is there a way to enter the amount in one field and have it automatically be entered into the other field? 

TOPICS
PDF forms
3.2K
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
1 ACCEPTED SOLUTION
Community Expert ,
Feb 11, 2019 Feb 11, 2019

No, it won't.

Anyway, if you don't want to give the fields the same name you can use this code (as the custom calculation script of the second field) to copy the value from the first (let's say it's called "Text1"):

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

View solution in original post

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 ,
Feb 10, 2019 Feb 10, 2019

Give both fields 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 Beginner ,
Feb 10, 2019 Feb 10, 2019

Let me be a little more clear.  I only want to enter that amount one time.  On my form, I have to list gift cards separately on the form.  The remaining balances of each gift card has it's own field for each card listed.  The amount entered in the remaining balances field is also entered in a "value" field for each card.  All value fields are then totaled at the bottom of the form.  Instead of entering the balance in the remaining balance field and then tabbing over to the value field and entering it again, I want to enter it once in the remaining balance field and have that amount automatically get entered in the value field.  Both fields are text fields that are set as a number with a dollar sign.

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 ,
Feb 11, 2019 Feb 11, 2019

Give both fields 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 Beginner ,
Feb 11, 2019 Feb 11, 2019

But my total value field has a calculation in it.  If i make both fields the same name, it will count the entered amount twice.  I'm looking for some type of javascript.

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 ,
Feb 11, 2019 Feb 11, 2019

No, it won't.

Anyway, if you don't want to give the fields the same name you can use this code (as the custom calculation script of the second field) to copy the value from the first (let's say it's called "Text1"):

event.value = this.getField("Text1").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
Community Beginner ,
Feb 13, 2019 Feb 13, 2019
LATEST

That 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