我有一个简单的 cakephp 表单,并希望"保存翻译"按钮位于取消并将用户返回到索引的链接的左侧,但我似乎无法让它工作。它始终将取消链接放在按钮下方。
我现在拥有的代码:
<tr>
<td>
<?php echo $this->Form->end('Save Translation'); ?>
</td>
<td>
<?php echo $html->link('Cancel', array('action' => 'index')); ?>
</td>
</tr>
我尝试过的代码:
echo $this->Form->end('Save Translation',array('label'=>'Save Translation','div' => false));
试试这个:
<?php
echo $this->Form->create();
echo $this->Form->input('name');
echo $this->Form->submit('Submit',
array('after' => $this->Html->link('Cancel', array('action' => 'index')))
);
echo $this->Form->end();
?>