-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
Hi,
I tried to configure a horizontal form in this way...
<?php
echo $this->Form->create(null, [
'horizontal' => true,
'columns' => [
'sm' => [
'label' => 4,
'input' => 4,
'error' => 4
],
'md' => [
'label' => 2,
'input' => 6,
'error' => 4
]
]
]);
echo $this->Form->input('username', ['type' => 'text']) ;
echo $this->Form->input('password', ['type' => 'password']) ;
echo $this->Form->input('remember', ['type' => 'checkbox']) ;
echo $this->Form->submit('Log In') ;
echo $this->Form->end() ;
?>But the helper do not print the form correctly an display two errors:
Notice (8): Array to string conversion [CORE\src\View\StringTemplate.php, line 311]
Notice (8): Array to string conversion [CORE\src\View\StringTemplate.php, line 311]
and i'm getting this output:
<form method="post" accept-charset="utf-8" columns="Array Array" class="form-horizontal" role="form" action=""><div style="display:none;"><input type="hidden" name="_method" class="form-control" value="POST" /></div><div class="form-group text"><label class="control-label col-xs-12 col-md-2" for="search-date">Date</label><div class="col-xs-12 col-md-4"><input type="text" name="Search[date]" class="form-control" id="search-date" /></div></div><div class="form-group text"><label class="control-label col-xs-12 col-md-2" for="search-date2">Date2</label><div class="col-xs-12 col-md-4"><input type="text" name="Search[date2]" class="form-control" id="search-date2" /></div></div></form>