Copy link to clipboard
Copied
I am creating a fillable form.
I want people to be able to fill in box 1. I then want that to copy to box 2, but I want to lock box 2 so that the info can only be edited in one spot. Is there a way to do this?
Thanks
Lisa
Copy link to clipboard
Copied
As you should be aware, fields of the same name share many properties and value is one them. So you cannot use the same names for both fields. You need to give each field a different name and set the second field to "read only". If your fields are numeric values, this excludes items like SSN,, dates, times, postal codes, etc, one can just add the value of the first field to the second field using either "The field is the sum of the following fields:" or the "Simplified Field Notation". If the first field has any non-numeric values or leading zeros then one needs to either use the "Custom JavaScript calculation" or the "On Blur" action. Since this field does not need to be recalculated each time any field is changed, I would use the "On Blur" Action of the first field, so the second field is only changed when the first field is changed. So you will be copying the focused field's value to the second field's value. A possible script is:
// copy the value of this field to the second field;
this.getField("Other_field_name").value = event.value;
You will have to change the "Other_field_name" to the actual name of the second field.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now