diff --git a/app/assets/javascript/add-letter-code-list.js b/app/assets/javascript/add-letter-code-list.js index 33084c83..0d1a2e23 100644 --- a/app/assets/javascript/add-letter-code-list.js +++ b/app/assets/javascript/add-letter-code-list.js @@ -14,11 +14,11 @@ letterCodeButton.addEventListener('click', addNumberTolist); //Function to save the nhs number and spit it back out above function addNumberTolist() { - if(document.getElementById('autocomplete-customTemplates').value != "") { - var number = document.getElementById('autocomplete-customTemplates').value; // get value of whats inside the box + if(document.getElementById('letter-codes-autocomplete').value != "") { + var number = document.getElementById('letter-codes-autocomplete').value; // get value of whats inside the box var letterCodelength = letterCodes.push(number) //adds it to the array + adds to new variable letterCodelist.innerHTML+="