Before posting, please see guidelines for contributing. If you're submitting a bug report, see below.
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
Use the GitHub issue search. Check if the issue has already been
reported.
Check if the issue has been fixed. Try to reproduce it using the
latest master or development branch in the repository.
Provide environment details. Provide your operating system, browser(s),
jQuery version, Bootstrap version, and bootstrap-select version.
Create an isolated and reproducible test case. Create a reduced test
case.
Include a live example. Use this Plunker debugging template to share your isolated test cases. You can also make use of jsFiddle or jsBin.
A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What browser(s) and OS
experience the problem? What would you expect to be the outcome? All these
details will help people to fix any potential bugs.
Example:
Short and descriptive example bug report title
A summary of the issue and the browser/OS environment in which it occurs. If
suitable, include the steps required to reproduce the bug.
- This is the first step
- This is the second step
- Further steps, etc.
<url>- a link to the reduced test caseAny other information you want to share that is relevant to the issue being
reported. This might include the lines of code that you have identified as
causing the bug, and potential solutions (and your opinions on their
merits).
Not a bug. But still:
name="multiple_select_name[]"<select class="selectpicker" multiple name="multiple_select_name[]"><form action="post.php" method="post">
<select name="multiple_select_name[]" class="selectpicker" multiple>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
</select>
<input type="submit" value="Submit">
</form>
<?php
var_dump($_POST);
?>
As you can see, it's a nice little array.
@ctocph is it actually supposed to work that way?
Can't make it happen... it just submits multiple my_input_name[]'s to the server..
It's supposed to give you an array with all the values you selected in the drop down.
The var_dump only shows you what comes in, you have to build your own little php-script to be able to handle the array and put them where you want them; in your db etc.
(I built a way to just input the array in to the db row, using json_encode($_POST['field']);)
(Also, I take the values via jQuery: var future_role=$('#field').val();
What are you expecting/trying to do?
Back from holidays, trying to recover memories. I was just trying to get the selected values in a array format to the server to handle it further with php, but something didn't work and didn't have the time to figure out why, so I made it by Javascript. :)
Most helpful comment
Not a bug. But still:
name="multiple_select_name[]"Like:
<select class="selectpicker" multiple name="multiple_select_name[]">As you can see, it's a nice little array.