I'm trying to replicate this logic:
insert multiple fields using foreach loop - using laravel 4 and blade.
I tried this:
<div>
{{ Form::select('linkType[]', array('Facebook', 'Twitter','Other')) }}
{{ Form::text('linkUrl[]') }}<br>
{{ Form::select('linkType[]', array('Facebook', 'Twitter','Other')) }}
{{ Form::text('linkUrl[]') }}
...
</div>
But that gives me this laravel error:
ErrorException (E_UNKNOWN) htmlentities() expects parameter 1 to be string, array given (view:...)
Any idea how to fix that? Thanks
Update
A few of these works: {{ Form::text('linkurl[]') }} So that is written as it should.
A few of this also works:
<select name="linktype[]"/>
<option value="facebook">Facebook</option>
<option value="twitter">Twitter</option>
</select>
So the problem is 99% sure in the:
{{ Form::select('linkType[]', array('Facebook', 'Twitter','Other')) }}
What I'm I doing wrong?
