Method for text field to copy data automatically from another text field

I'd like to know how to do the following:
When one text field is competed, another field copies that text automatically.

Im fairly new to PDF architect & especially Javascript, but if someone could share the code and method that would work best it would be greatly appreciated.

It could be triggered by an event or button. Im open to ideas on that part.

Simplest solution would be best. Thanks!

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

I put this code under the second text field as follows:
Events> field events> validate> change.

This code worked. Copies text from the field titled Text1 quite well.

Putting this solution here in case anyone sees my post and has the same problem.

Doesnt work when opening pdf in Chrome and edge. If anyone has a solution, please advise. Thanks.