1

select's id attribute is not getting set by using

{{ Form::select('language', $options, 'en_ZA', array('id' => 'language')) }}

In my view and "laravelcollective/html": "5.2.*" in composer.json.

I also wanted to know going forward using Laravel 5.2., if it's best to use "laravelcollective/html": "5.2." instead of "illuminate/html" in my composer.json file?

Neha Gangwar
  • 670
  • 9
  • 14
Tim Kruger
  • 863
  • 2
  • 10
  • 26
  • Let's keep it at one question at the time. :) – Ivar Jan 12 '16 at 09:32
  • @Ivar I was thinking about doing that, but because they're related I thought it would be quicker to create one question, instead of asking a separate question. By the way do you have an answer for one of the 2 questions asked? – Tim Kruger Jan 12 '16 at 09:35
  • They are, but since SO is also used for people with the same question in the future, it is more organized if you keep them separate. And no, I'm not familiar with Laravel. Just came by this question due to the [review](http://stackoverflow.com/review/triage/10861392). – Ivar Jan 12 '16 at 09:39
  • 1
    OK no worries, I'll keep all questions separate going forward. – Tim Kruger Jan 12 '16 at 09:42
  • It doesn't look like it's false, the problem is that you cannot get the `id="language"` right? – Ozan Kurt Jan 12 '16 at 10:27
  • Yeah, basically the source was showing this`` instead of `` but I posted a solution below. – Tim Kruger Jan 12 '16 at 10:35

1 Answers1

-2

For anyone interested I managed to figure it out, you need to do this

{{ Form::select('language', $options, 'en_ZA', ['id' => 'language']) }}

Instead of

{{ Form::select('language', $options, 'en_ZA', ('id' => 'language')) }}

I'll create a new question regarding my second question above and mark this question as answered.

Tim Kruger
  • 863
  • 2
  • 10
  • 26
  • 1
    This post might be a bit old, but I just wanted to say to the person who down voted this answer, surely you need to add a comment to clarify your down vote? Just saying as it's pretty annoying if an acceptable answer gets down voted without a comment. – Tim Kruger Mar 02 '16 at 14:10