diff --git a/static/script.js b/static/script.js index 28dbbeb..ea45e92 100644 --- a/static/script.js +++ b/static/script.js @@ -367,9 +367,13 @@ updateProfileWidgets(); if (el) el.textContent = ""; } - function showFieldError(id, message) { - var el = document.getElementById(id); - if (el) el.textContent = message; + function syncSkillsHiddenInput() { + if (!skillsHidden){ + skillsHidden = document.getElementById("skills"); + } + // Keep the hidden in sync for form serialisation + // The API expects a comma-separated string, so join the array that way + skillsHidden.value = selectedSkills.join(", "); } function clearAllErrors() {