javascript – Note tool – Fill a text box with a template

I have been working on a notes tool for my company to simplify the auditing and accounting of accounts. I've added extra features that also help with different aspects of the work.

I wonder if I can do anything to streamline some of the features I've created.

Such as the "pre-filling options". They take the contents of the hidden divs and add them to the text boxes of the note. I'm sure there's a better way to do that, but I think it's been too long since I think.

All comments are welcomed!

I have deleted any reference to the company to avoid any problem of publishing this information.

The complete source is too big to be pasted here:
https://pastebin.com/pdYH2DMq

Here's how I currently fill boxes with predefined templates.

/ * Fill problem and resolution areas with templates * /
$ (document) .ready (function () {
$ (& # 39 ;. prefill & # 39;). on ("click", function (e) {
var id = $ (this) .attr ('id');
id1 = id + "1";
id2 = id + "2";
id3 = id + "3";
if (document.getElementById ("issue"). value! = & # 39;) {
document.getElementById ("issue"). value + = & # 39;  n & # 39;
}
if (document.getElementById ("reso"). value! = & # 39;) {
document.getElementById ("reso"). value + = & # 39;  n & # 39;
}
if (document.getElementById ("scratch"). value! = & # 39;) {
document.getElementById ("scratch"). value + = & # 39;  n & # 39;
}
document.getElementById ("issue"). value + = document.getElementById (id1) .innerHTML;
document.getElementById ("reso"). value + = document.getElementById (id2) .innerHTML;
if (document.getElementById (id3) .innerHTML! = & # 39;) {
document.getElementById ("scratch"). value + = document.getElementById (id3) .innerHTML;
}
$ (& # 39; textarea & # 39;). autoHeight ();
});
});

/ * Buttons Add End Result * /
$ (document) .ready (function () {
$ (& # 39 ;. ending & # 39;). on ("click", function (e) {
endid = $ (this) .attr (& # 39; id;);
endid1 = endid + "1";
if (document.getElementById ("reso"). value! = & # 39;) {
document.getElementById ("reso"). value + = & # 39;  n & # 39;
}
document.getElementById ("reso"). value + = document.getElementById (endid1) .innerHTML;
$ (& # 39; textarea & # 39;). autoHeight ();
})
})
/ * // Add the final result * /



















RESOLVED
UNRESOLVED
CREATION OF WORK ORDER TO TROUBLESHOOTING
CREATION OF WORK ORDER FOR TECH TO COMPLETE UPDATE
Service Out
CST informed of the current blackout in the region
Suggested steps Step 1 2nd step
Where is the technology
Suggested steps Step 1 2nd step
Billing - CST Call to pay his bill
Suggested steps Step 1 2nd step
Billing - Account in Soft Disconnect
Suggested steps Step 1 2nd step
Billing - Need to recharge prepaid Internet
Suggested steps Step 1 2nd step
Billing - Unpaid disconnection
Suggested steps Step 1 2nd step
Billing - ARU does not work
Suggested steps Step 1 2nd step
Suggested steps Step 1 2nd step
Billing - Unplanned bill increase
Suggested steps Step 1 2nd step
Invoicing - The customer wants to discuss upgrade options.
Suggested steps Step 1 2nd step
Billing - Refer a Friend
Suggested steps Step 1 2nd step
Internet - Out
Suggested steps Step 1 2nd step
Internet - CST wants to add a modem owned by the customer MAC address of the new modem: ##########
Suggested steps Step 1 2nd step
Internet - Cant connect to WiFi
Suggested steps Step 1 2nd step
Internet - Client-owned router problem
Suggested steps Step 1 2nd step
Video output
Suggested steps Step 1 2nd step
Video - Glitching
Suggested steps Step 1 2nd step
Video - Change the volume or turn on / off the TV TV Brand:
Suggested steps Step 1 2nd step
Video - audio / language problem
Suggested steps Step 1 2nd step
Video - Changed channel / open guide / menus
Suggested steps Step 1 2nd step
Video - No equipment to troubleshoot
Suggested steps Step 1 2nd step
Video - The message "Your service must be activated before continuing" on the screen
Suggested steps Step 1 2nd step
Video - Message "Not included in your current subscription" on the screen
Suggested steps Step 1 2nd step
Video - "DVR Service unavailable" Message on screen
Suggested steps Step 1 2nd step
VIDEO - XSTREAM BOX DOES NOT CONNECT TO THE INTERNET
Suggested steps Step 1 2nd step
Telephone output
Suggested steps Step 1 2nd step
Phone - Port number of the previous carrier
Suggested steps Step 1 2nd step
Phone - CST asking to change phone number
Suggested steps Step 1 2nd step