Input in HTML that can save multiple values?

2

How can I make an input similar to the one in the forum? link in the tags area, when we insert an example tag: "PHP", and we give enter it already saves that value and it waits plus one from the user.

    
asked by anonymous 07.11.2015 / 16:31

1 answer

3

Without JavaScript you will not be able to implement. I suggest using a jQuery plugin like Select2 . Follow the link to example page and a basic example:

HTML:

<select class="js-example-basic-multiple" multiple="multiple">
  <option value="SP">São Paulo</option>
  <option value="MG">Minas</option>
</select>

JavaScript:

$(".js-example-basic-multiple").select2();
    
09.11.2015 / 02:00