Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
96 views

I am adding a new option to a select2 optiongroup with custom drawing of options. here is my code: function defaultParameter(value, defaultValue) { return typeof value !== 'undefined' ? value : ...
Emma Harris's user avatar
2 votes
2 answers
93 views

I have a select with months. The most used is April, so I'd like to present it when the user open the select when nothing else is chosen already. I have a solution that works well in Chrome (the ...
Franta's user avatar
  • 57
0 votes
1 answer
43 views

I have an issue rendering some select2 fields: When multiple forms with same select2 widget are used within a single template some select2 fields are not rendered as expected (rendered just as normal ...
Antony_K's user avatar
  • 196
2 votes
1 answer
54 views

I can't get the results to return to the select box, it's always showing JSON instead. public function autocomplete(Request $request) { $data = Pegawai::where('nama', 'LIKE', '%'.request('q').'%')-...
Yudhi Ramadhoni's user avatar
0 votes
1 answer
54 views

I've been attempting to use Select2 in my ASP.NET Core MVC project. I have a partial view that has a pop out window for creating participating agency records. What I'm trying to do is use the select2 ...
mag232913's user avatar
1 vote
2 answers
146 views

I'm using Django with django-autocomplete-light and Select2 to create an autocomplete field. The Select2 field is dynamically added to the page when another field is selected. It fetches data from a ...
CanAnyOneHelpMe's user avatar
1 vote
1 answer
181 views

I have a multiple select element with select2 v 3.5.2 plugin. I need to be sure that the specific option value -1 will be not selected with other values. I tried this solution: $('#mysel').on("...
Tobia's user avatar
  • 9,667
0 votes
1 answer
220 views

I'm using Livewire in a Laravel project and have a Select2 dropdown inside a modal. The dropdown is used to select a country, and it should initialize with a list of countries while also pre-selecting ...
Ahmad Faizan's user avatar
0 votes
2 answers
88 views

I want to ask about select2. I want, when I choose the option it will be hidden from the options in the select. And also if we remove it in multiple select option, it will be showed too in the option. ...
Filbert Umbawa's user avatar
0 votes
0 answers
45 views

I'm using Select2 4.0.5 with bracket plus bootstrap 4. Its working fine so far with my customData. I tried creating a test select element outside the modal with my current setup for initialization and ...
BlackRegal's user avatar
-1 votes
1 answer
58 views

With logged in user and visible admin bar in Wordpress, when trying to select an option through select2, the container shows and hides instantly. The user is not able to click any option from the ...
Marian Rehak's user avatar
0 votes
1 answer
48 views

My HTML code is: <select id="block-permissions" name="permissions" multiple="multiple"> {{-- <option value="0">Topic 0</option> When ...
vbulash's user avatar
  • 393
1 vote
1 answer
38 views

There is a piece of code that is responsible for updating the QR code during events ['paste', 'keyup', 'change'], but for some reason the Select2 list does not work and accordingly, does not transmit ...
Vasyl Vandych's user avatar
0 votes
1 answer
323 views

When I use select 2 I can't get the value, it always returns null. Can you help me? I've already tried doing @bind, @onchange and nothing works. My Code : <select class="form-select" data-...
Hayashi's user avatar
1 vote
0 answers
97 views

I want to have checkbox to select in my options but don't know what to do. References Here is my select box code: <select class="form-control select2" id="data-set" name="...
Payal Desai's user avatar
1 vote
1 answer
119 views

My clear button overlaps the placeholder: Have you ever had this problem? I'm using the bootstrap5 theme for select2. Everything else works. It's just this button that's causing the problem. Thanks. ...
TheoB's user avatar
  • 31
0 votes
1 answer
228 views

I have the modal where this modal show the content dynamically by using js. the modal html is like this: <button type="button" class="openModalBtn btn btn-outline btn-primary btn-sm ...
Unknown's user avatar
  • 70
0 votes
1 answer
39 views

Using the select2 javascript for select boxes, it basically hides the actual real select box and gives you a span with a ul li list inside. However, the li options don't have the actual real value ...
NaughtySquid's user avatar
  • 2,098
0 votes
1 answer
147 views

I have a project in Angular 15 that uses the ng-select2-component npm library for the dropdown component (both single and multi). The selected dropdown values themselves are attached to a form group ...
ShadowProg's user avatar
0 votes
1 answer
72 views

I want to set the border radius of this select2 in this input group to 0 <div class="input-group"> <span class="input-group-addon"> <i class="fa fa-user&...
ToanBD's user avatar
  • 13
0 votes
0 answers
66 views

I'm working with a Vue.js application that uses the Select2 library for a dropdown in my reviseReport component. I have a NestedForm component where this dropdown is implemented. I need to trigger an ...
Jay patel's user avatar
0 votes
0 answers
53 views

I am using the acts-as-taggable-on gem as well as the select2.js library. My community_resource.rb looks like the following: class CommunityResource < ApplicationRecord acts_as_taggable_on :...
bee's user avatar
  • 1,623
1 vote
0 answers
86 views

I'm using Select2 and trying to implement a feature where new data is prepended or unshifted to the dropdown options when the user scrolls up. However, I'm encountering the errors "Cannot read ...
Ods Wei's user avatar
  • 11
-1 votes
1 answer
195 views

I'm trying to get the value of a select2 by the change event, but I only found ways using jquery and I want only with javascript. selectProduct.addEventListener('change', () => { console.log(...
Jhonatan Martimiano's user avatar
0 votes
1 answer
298 views

Bootstrap version: 5.1.3 Select2 version: 4.1.0 Link to replicate: https://jsfiddle.net/L60xwgmt/1/ $('.select2').select2({ dropdownParent: $('#dataModal'), ...
Richard Jacobs's user avatar
0 votes
2 answers
109 views

Lets say I have item1,item2,item3 pre selected, how do i allow the user to delete only item3 and hide the X delete button from the others. Thanks in advance
EL MAHDI BOUZKOURA's user avatar
0 votes
1 answer
179 views

I have a django application with python 3.7 and Django 2.2.10, which uses django admin, with the materialize css subscript for the templates. From the latest Chrome updates, the behavior of forms in ...
Dev Orea's user avatar
0 votes
1 answer
104 views

I'm trying to reinitialize Select2 for dynamically added repeater items in my form. The Select2 plugin works fine on page load, but when I add a new repeater item, the Select2 dropdown UI isn't ...
Jasmirulnaim's user avatar
0 votes
0 answers
74 views

I am using select2 inside a responsive table and it's adding unnecessary horizontal scrollbar to the page. If the select element is visible on page load, then the scroll bar doesn’t appear. However, ...
Dev Loper's user avatar
1 vote
1 answer
2k views

I want to create multiple selects using the select2 plugin in the livewire component, but the first time I do select "onchange", my select2 disappears into a regular select option. I've used ...
Xerror's user avatar
  • 39
0 votes
1 answer
93 views

I am seeing something I can't explain. I am using Select2 for a searchable drop down field. I am trying to configure the options with a different string for the value as opposed to the text. I ...
Scott Sarnikowski's user avatar
1 vote
1 answer
122 views

I am using Select2 for a multi select. This select is used to filter a list. Selecting one item rebuilds the list with that filter(s). Removing one item, again rebuild the list without that specific ...
Guillaume Bois's user avatar
0 votes
0 answers
74 views

when the result is not found, the text "result not found" appears and the existing data is hidden.when I delete it with backspace, the old data comes back before the combobox closes.when I ...
Mert Buyukeryılmaz's user avatar
0 votes
1 answer
57 views

I am creating a DnD style calculator. There are class trees that are 3 classes deep. How would I be able to force Select 2 to only show level 1, level 2 and level 3 in their respective selects and ...
ConnectedToast's user avatar
0 votes
0 answers
75 views

I have implemented select2 in codeigniter for ajax based results and its working perfectly. But the challenge I am encountering is that the data in database is not sanitized e.g E.C.G Machine ECG ...
Muhammad Asif Raza's user avatar
0 votes
1 answer
59 views

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 ...
EvanLTD's user avatar
0 votes
0 answers
68 views

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="...
Timur's user avatar
  • 117
0 votes
1 answer
73 views

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 ...
Srikanth Reddy's user avatar
0 votes
0 answers
96 views

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 ...
Sachin Singh's user avatar
0 votes
0 answers
63 views

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 ...
user23190550's user avatar
0 votes
1 answer
50 views

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> ...
Eugene Sukh's user avatar
  • 2,807
1 vote
1 answer
111 views

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 ...
nama asliku's user avatar
0 votes
1 answer
100 views

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 ...
sd_30's user avatar
  • 748
0 votes
1 answer
65 views

$(document).ready(function() { ///dateee picker $("#date-range-options").select2({ placeholder: "Select", minimumResultsForSearch: -1, closeOnSelect: false, allowClear: false })...
sd_30's user avatar
  • 748
-1 votes
2 answers
264 views

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 ...
MatteoC's user avatar
  • 21
0 votes
1 answer
221 views

Using Select2 4.1, jQuery 3.7 When I show the select2 in a modal/lightbox, it does not position the dropdown correctly. When the select is clicked, it should show the dropdown directly above or below ...
developer981's user avatar
0 votes
0 answers
47 views

so I was trying to click a dropdown option of a site there is the code : so I was trying to click a dropdown option of a site there is the code : <ul class="select2-results" role="...
J Mahendran's user avatar
1 vote
1 answer
265 views

I have the following Problem. When my Livewire3 component renders for the first time my chosen dropdown will be available as an select2. But as soon as I change something in the Livewire Component the ...
pascal-prfst's user avatar
0 votes
1 answer
292 views

I have my first select2 that I pull data into from remote ajax search with multiple options allowed: $("#EmailSentToGroup").select2({ ajax: { url: "/trip-search", ...
Dennis's user avatar
  • 716
0 votes
1 answer
158 views

When I use select2 in a yii2 form, an error like this always shows: Invalid Configuration – yii\base\InvalidConfigException You must install 'yiisoft/yii2-bootstrap' extension for Bootstrap 3.x ...
Daffa Alif's user avatar

1
2 3 4 5
112