0

I have a field group where I want to add multiple values selected by the user. I have been able to create an array with all the selected values but I am unable to add those values to the selector. Here is the piece of code.

    console.log(allValues)
    jQuery('input[name="myServices"]').join(allValues);//.add(allItems)
    console.log("Befrejkjk"+document.getElementById('myServices').value

Doing console.log(allValues) prints an array with multiple values but the next statement just adds the first value of allItems. Please suggest.

user_dev
  • 1,357
  • 3
  • 20
  • 46

0 Answers0