Basically just trying to add text to an input field that already contains a value.. the trigger being a button..
Before we click button, form field would look like..
Don't forget to keep the input field on focus for future typing with input.focus(); inside the function.
input.focus();