我有两个关联的表(客户有很多命令),这是我的表格:
<?php echo $this->Form->create('Customer');?>
echo $this->Form->input('Client.name', array('disabled' => true,'value' => 'francis'));
echo $this->Form->input('Command.0.the_date');
echo $this->Form->end(__('save'));?>
这是我的功能:
public function add() {
if (!empty($this->request->data)) {
unset($this->Customer->Command->validate['customers_id']);
$this->Customer->saveAssociated($this->request->data);
}
}
但是当我处理保存数据时,什么也没有发生!为什么?谢谢!