问题
If I change the error to simple HTML, the error is gone.
{{Form::open(array('url'=>'')) . "" }}
<div class="basic-form">
and it goes on: (cannot paste more code here)
<div class="hsb-input-1">
{{Form::text('user_query', array('class'=>'form-control', 'placeholder'=>'I\'m looking for qualified personnel in ...')) }}
</div>
<div class="hsb-text-1">Language</div>
<div class="hsb-container">
<div class="hsb-select">
{{Form::select('selection',
['all'=> 'Select all',
'c' => 'C/C++/C#',
'html' => 'HTML/CSS/Design',
'java'=> 'Java',
'javascript'=>'Javascript',
'php'=>'PHP',
'python'=>'Python',
'ruby'=>'Ruby',
'xml'=>'XML/XSLT/Xquery',
'fortran'=>'Fortran',
'vb'=>'VB',
'sql'=>'SQL',
'abap'=>'ABAP',
'oc'=>OC,
'swift'=>'SWIFT'],
all,
['class' => 'form-control'])
}}
</div>
</div>
<div class="hsb-submit">
{{Form::submit('Submit', array('class' => 'btn btn-default btn-block', 'id' => 'submit'))}}
<!--<input type="submit" name="search" class="btn btn-default btn-block" value="Search"> -->
</div>
</div>
{{Form::close()}}
What can I do to correct the error message? I think I have a mistake in the form.
回答1:
You use it in wrong way. The second argument for text
is not array of options but value (reference) so instead of:
{{Form::text('user_query', array('class'=>'form-control', 'placeholder'=>'I\'m looking for qualified personnel in ...')) }}
it should be rather:
{{Form::text('user_query', null, array('class'=>'form-control', 'placeholder'=>'I\'m looking for qualified personnel in ...')) }}
来源:https://stackoverflow.com/questions/27203369/form-error-htmlentities-expects-parameter-1-to-be-string-array-given-and-no-l