Support the ongoing development of Laravel.io →
Blade Forms Packages

Hi everyone!

I started with Laravel 5 following the Blog example from Laracasts (Laravel 5 Fundamentals) but I have a problem adding the Select2 jquery in my form. I followed the instrucctions adding the script in the main blade "app.blade.php" (with the default "app.blade.php" code):

http://i.imgur.com/x5jRqTa.png

And then this is the partial with the Form (I try to use the Select2 function with the "tag_list"):

http://i.imgur.com/kC4aCAc.png

But it doesn't work, the "tag_list" is showed just like a multiple option.

Any ideas?

Thank you so much!

Last updated 3 years ago.
0

I don't see any errors in the snippets you showed. Could you open console in your web browser and see if there are any errors popping up after page load? If you are using Google Chrome, here's how to work with console

0

Hi Xum,

This is the error I get:

http://i.imgur.com/XGjghsX.png

0
Solution

Select2 requires jQuery library. Insert this code in your app.blade.php before the Select2 code:

<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
0

That was the problem!! Thank you so much!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Polinicles polinicles Joined 26 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.