我试图在我的“Requestc”控制器上保存一个数组,其中包含来自多选所选脚本的数据。
我的观点:
<select data-placeholder="Selecione as certidões" name="certidoes[Requestc][][caminho]" multiple="multiple" style="width:400px;" class="chzn-select">
<?php foreach ($certidao as $certidoes): ?>
<option value="<?php echo $certidoes['Certificate']['id']; ?>"><?php echo $certidoes['Certificate']['nome']; ?></option>
<?php endforeach ?>
</select>
我的控制器:
if(!empty($solicitacao)) {
$this->request->data['Requestc']['request_id'] = $this->Request->id;
$data = $this->request->data['certidoes'];
$this->Request->Requestc->saveAll($data['Requestc']);
}
当我保存我的“request_id”时,它仍然是空白的。