Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
Give both fields the same name.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Give both fields the same name.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
That works! Thank you
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more