Auto fill text field based on entry to another text field
I am looking for a script to auto complete a text field when a specific number is imputted into another field, so that user filling out form does not have to reference another document to find the corresponding number, aim is to reduce human error input by making the document do the hard work.
i.e. text fields are 'Origination - Unwind Direction 1' (this is field 1) & Origination - Unwind Direction 2' (this is field 2)
If I were to enter '1' in to Field 1, I want Field 2 to automatically show '2', or if i were to enter '3' into Field 1, I want Field 2 to show '4'. Input will continue roughly on this basis.
Aim is to lock Origination - Unwind Direction 2 (Field 2) from user filling out form so that errors cannot occur, thansk for any help