Questions tagged [jquery-select2]
Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
jquery-select2
5,628
questions
0
votes
0
answers
12
views
Dynamically-created Select2 options won't save to database (Wordpress + BuddyPress)
I’m using BP XProfile Custom Field Types plugin to add a “Tags” field (select2-based multiselect) to the BuddyPress user profile page.
After the edit profile page loads, I’m dynamically adding new ...
0
votes
0
answers
23
views
Select2 multiple when I press button remove select item my modal is closed ,but my modal shouldn't close
This is my code tgoMeanItem id is multiple select2
<div class="col-lg-12 mt-2">
<label for="date-field" class="form-label">
<strong class="...
0
votes
1
answer
37
views
JQuery Select2 dropdown not able to set the text in MVC
I am using the select2 jquery plugin. I was unable to set/assign the text to the select control. I used select2 with trigger function for setting the value. Firstly the control which I have taken is ...
0
votes
0
answers
31
views
Disable auto focus on select2 drop-down in modal?
I have added multiple Select2 dropdowns in my modal and initialized these select dropdowns when the modal opens. There was one problem: when we open the Select2 dropdown, its positioning was not ...
1
vote
0
answers
35
views
Select2 unslected options
I am using select2 with pagination to load more data from db when user scroll the drop down, the issue i am facing is when i select all the records and then i unselect some record then some of them ...
0
votes
0
answers
25
views
Wordpress Select2 Ajax query call data from DB
I'm a beginner coding with JQuery Select2 and Ajax.
I'm trying to load dataset from DB into JQuery Select2 dropdown with search option.
This is the function for DB query and enqueue scripts in my ...
0
votes
1
answer
36
views
Cannot make preselect value in select2 dropdown
I have select 2 dropdown in my project
Here is how it's added on view (Razor)
<div class="form-group">
<label class="required-label">Tier</label>
...
-1
votes
0
answers
32
views
Select2 not loading options on initialization
I have a select on my page and it has options in it. When I initialize the select2 the options are not loaded.
<select class="form-select form-select-sm" id="select-user-1">
...
0
votes
0
answers
20
views
Select2 - SearchBox hides all
I've a Select2 element that populates after a jquery call.
I use it in a modal window.
It has a search box, but the search box hides everything, also the placeholder. I've two problems here
...
1
vote
1
answer
30
views
How to pass the selected value of select2 element as parameter in htmx?
I want to do GET request with query parameter. However, the query parameter need to be taken from select2 elements. How do I pass the selected value of select2 to htmx?
Below is the simplified ...
0
votes
1
answer
32
views
The footer is adding multiple times below different select2 dropdown
I am using select 2 jquery plugin to create multiple multi select dropdowns, At some scenarios the footer is getting appended multiple times under the dropdown menu. For example if you open drodpown 1 ...
-1
votes
0
answers
16
views
Close the select2 dropdown only when clicking on a specific button [duplicate]
I am using the Select2 jQuery plugin to create a dropdown. I have multiple dropdowns on my page.
I want the dropdown to close only when licking on 'Apply', 'Cancel' or 'Reset' buttons. I don't want ...
0
votes
1
answer
46
views
select2 date custom option is not opening if clicked again
$(document).ready(function() {
///dateee picker
$("#date-range-options").select2({
placeholder: "Select",
minimumResultsForSearch: -1,
closeOnSelect: false,
allowClear: false
})...
0
votes
0
answers
37
views
Can somebody help me out for the following multiple drop-down binding problem?
I want to bind the second drop-down based on first drop-down's selected option.
Also when add second dropdown first selected system should be disabled.
Html for drop-down is as below:
<div ...
-1
votes
2
answers
77
views
Select2 not working on localhost (html-PHP)
I am trying to use select2, but for some reason it does not work. The code below is fairly simple: it pulls data from a Microsoft SQL database, and creates a dropdown list.
All of this is running on a ...