Add-ons form modifikation

Hello

I’m trying to write an add-on which will complete the form on my website.

I created the menu.
Menu 1 I copy the data and process it
Menu 2 should insert data into the input field - Unfortunately it does not work

I tried several ways e.g.
document.getElementById
document.getElementsByTagName

Please help me