2

We are currently creating a drop down in Laravel like so:

{{Form::select('job_location_id', 
                        $jobLocationList, 
                        '',
                        ['class' => 'form-control', 
                        'autocomplete' => 'off']
                        )}}

Is it possible to make this a "Select Multiple" with Laravel?

1
  • That last array parameter is really just a list of attributes to put on the element. You can put anything in there. Commented Sep 23, 2015 at 19:52

1 Answer 1

3

Try this:

{{ Form::select('job_location_id[]', $jobLocationList, '', [
    'class'        => 'form-control',
    'multiple'     => 'multiple',
    'autocomplete' => 'off'
]) }}
Sign up to request clarification or add additional context in comments.

4 Comments

Oh my god worked perfectly! How do i give you 1,000 pts?
Haha. Accepting the answer is more than enough, trust me :)
Yes it makes me wait wait 15 minutes before I can lol. Okay the only thing i changed was select('job_location_id' to select('job_location_id[]' and it worked. Thanks again!
Ah, yes, you'd need that, wouldn't you? Haha. Updated my answer as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.