Author: | varundewan |
---|---|
Views Total: | 25,979 views |
Official Page: | Go to website |
Last Update: | January 28, 2019 |
License: | MIT |
Preview:

Description:
A vanilla JavaScript multi-select plugin that transforms the normal multi-select element into a user-friendly tags input.
The users are allowed to select multiple options from the dropdown select. Click the ‘X’ button to remove the selected option.
How to use it:
Import the main JavaScript and Stylesheet into the document.
<link rel="stylesheet" href="css/style.css"> <script src="js/index.js"></script>
Attach the plugin to a multi-select element and done.
<select multiple="multiple" id="myMulti"> <option>CSS</option> <option>SCRIPT</option> <option>COM</option> <option>jQuery</option> <option>HTML5</option> </select>
var myDrop = new drop({ selector: '#myMulti' });
Specify an array of preselected options.
var myDrop = new drop({ selector: '#myMulti' preselected: [0, 2] });
But Not getting the form submitted values, please let me know how about getting the values
yes… please how to get selected values from this dropdown to insert it in mysql trought php??
thank you
You really need to tell the way to get values … Its useful but still incomplete without values.
If it helps … in PHP, in the select tag, put
name=multi[], id=multi
The square bracket allows for multiple values to be fed back as an array in the $_POST[‘multi’] system variable. I’m guessing that other languages will be similar.
First Line in your JS is “var $ = { …”
that overrides jquery and so in many cases it’s not useable (bootstrap needs jquery and so on …)