Closed NeedHelp001 closed 8 years ago
$('#selectImage').data('picker').selected_values().length;
Where $('#selectImage') is my HTML <select>
element with that ID.
Thank you. May I know how am I going to get the id of the images selected and save it into the database. Currently, I am only able to save one id into the database , i am required to save multiple ids of the image selected.
You can just loop through the array and then foreach value in the array save it.. But that's back-end work.
$('#selectImage').data('picker').selected_values();
@ArmindoMaurits explained the client side of this.
To properly send multi values to a server you need to be careful with your naming, take a look at this http://stackoverflow.com/questions/11616659/post-values-from-a-multiple-select
ie, notice how it's named name="something[]"
and not name="something"
Hi , may I know how do I get the number of pictures that were selected ? Thank you