diff --git a/create.php b/create.php index b336706..5aa9256 100644 --- a/create.php +++ b/create.php @@ -231,7 +231,8 @@ } function updateGoodRoles() { - let goodRoles = document.getElementById('goodRoles').value; + let selected = document.querySelectorAll('#tplaysbestwith option:checked'); + let goodRoles = Array.from(selected).map(el => el.value); goodRoles.forEach((element) => document.getElementById("tplaysbestwith").appendchild(document.createElement("LI").appendchild(document.createTextNode(element)))); }