Questions tagged as 'jquery-select2'

0
answers

Use Select2 to search states and cities

I want to improve the search for cities and states. I made this dynamic with Select2: /*************** Procurar estado ***************/ $( ".estado" ).select2({ placeholder: "Estado", ajax: { url: "https://www.agenc...
asked by 23.08.2018 / 16:22
2
answers

Select2 in several fields with the same name

I am making an ordering page, where you can register several products. In order to register the products the users have the options of Produto, quantidade, valor, subtotal , if they want to add another product, it has a function that ad...
asked by 23.10.2018 / 18:14
1
answer

PartialView not loading in select2 pattern

I have a problem when I call my PartialView, it loads all the data in the View but not in the select2 format, in case it would be when clicking on the input the data appears, it is currently loading all on the screen. ExofaViewthatIuseandloa...
asked by 17.04.2018 / 16:40
2
answers

When clicking on an option from a list, hide options from another select

I would like, for example, that by choosing the '10 people 'option in select' Size ', I could hide specific options in the selects' Template ',' Fillings ',' Options to Drain 'and' / p> Example: <div class="form-group"> <span cl...
asked by 11.02.2017 / 03:32
1
answer

Get the value of a li and create an input hidden with the value when the li is clicked

Good morning, gentlemen, I'm having a hard time taking action. I want it when clicked on the li, it adds in the div #form an input type hidden with the value of li. and that this happens only when you click once. <div id="selecao">...
asked by 04.08.2015 / 16:22
2
answers

After selecting with Select2, how do I automatically fill in form fields?

I am creating a form that has a field that the user will enter the company name and Select2 will perform a search in the DB and return the company name to the field, example in the image below: HTMLscript:<scriptlanguage="JavaScript" type=...
asked by 28.07.2014 / 16:16
1
answer

Jquery Form Validation Error div position in select fields [closed]

How to change the position of error text in select2 fields. is popping up on the field, I want it to appear below! Any tips? <!--/field--><divclass="col-md-3"> <div class="form-group"> <label class="control-label">SEX...
asked by 16.10.2017 / 13:36
2
answers

Create a filter with multiple categories using a select

:: EDIT :: Currently, the official code looks like this, but the Almer code still does not work: Javascript <script> $(document).ready(function() { var arraySelects = ['modelo', 'massa']; $("#tamanho").change(function() { f...
asked by 15.02.2017 / 17:42
1
answer

Select2 to display optgroup value and concatenated option

I'm creating a selection field where the user can choose between several states, but I need to show when I select both the value of the optgroup and the option, Remembering that I'm using library select2 follows the base html <select n...
asked by 11.02.2016 / 22:11
1
answer

How to change the formatNoMatches in select2 4.0.0?

I'm using select2 4.0.0 and I'm having trouble changing the way the message that says I have not found results is shown. In the old version I used formatNoMatches to change the presentation, how is it done now? obs: I can not change thi...
asked by 24.03.2015 / 17:30