Answer the question
In order to leave comments, you need to log in
Why is Select2 AJAX not being sent in Symfony 3.4?
In Symfony 3.4 I use Select2.
$builder->add('companycode', ChoiceType::class, array(
'label' => 'Компания',
'required' => false,
'attr' => array('class' => 'ul-select'),
))
$('.ul-select').select2({
});
$('.ul-select').select2({
ajax: {
url: '/customers/ulresponse',
dataType: 'json',
data: function (params) {
return {
searchstr: params.term // search term
};
},
},
minimumInputLength: 3,
language: 'ru',
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question