Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CakePHP置位重置&;“提交”按钮位于同一行_Php_Cakephp_Cakephp 2.0_Cakephp 2.3 - Fatal编程技术网

CakePHP置位重置&;“提交”按钮位于同一行

CakePHP置位重置&;“提交”按钮位于同一行,php,cakephp,cakephp-2.0,cakephp-2.3,Php,Cakephp,Cakephp 2.0,Cakephp 2.3,我发现当我使用$this->Form->submit时,submit按钮被包装在div.Form-group中 echo $this->Form->submit('submit', array( 'div' => 'form-group', 'class' => 'btn btn-primary' )); echo $this->Form->button('Reset', array('type'=>'re

我发现当我使用$this->Form->submit时,submit按钮被包装在div.Form-group中

echo $this->Form->submit('submit', array(
            'div' => 'form-group',
            'class' => 'btn btn-primary'
));
echo $this->Form->button('Reset', array('type'=>'reset' ,'class' => 'btn btn-primary'));
echo $this->Form->end();

您可以将
div
设置为
false
以禁用两个按钮上的换行div,然后手动回显div:

echo '<div>';
echo $this->Form->submit('submit', array(
    'div' => false,
    'class' => 'btn btn-primary'
));
echo $this->Form->button('Reset', array(
    'type'=>'reset',
    'class' => 'btn btn-primary'
    'div' => false
));
echo '</div>';
echo';
echo$this->Form->submit('submit',数组(
'div'=>false,
“类”=>“btn btn主”
));
echo$this->Form->button('Reset',array(
'类型'=>'重置',
“类”=>“btn btn主”
'div'=>false
));
回声';

您可以将
div
设置为
false
以禁用两个按钮上的换行div,然后手动回显div:

echo '<div>';
echo $this->Form->submit('submit', array(
    'div' => false,
    'class' => 'btn btn-primary'
));
echo $this->Form->button('Reset', array(
    'type'=>'reset',
    'class' => 'btn btn-primary'
    'div' => false
));
echo '</div>';
echo';
echo$this->Form->submit('submit',数组(
'div'=>false,
“类”=>“btn btn主”
));
echo$this->Form->button('Reset',array(
'类型'=>'重置',
“类”=>“btn btn主”
'div'=>false
));
回声';