我有一张桌子叫specs
. 我需要以一种形式从其中编辑多行并立即保存。
// table structure
specs [id, name, value, owner_id]
// controller part
$data = $this->Spec->find('all'); // skipping the conditions and other sub-code
$data = set::combine(...);
/*
result, keyed using the spec[id] column.
array (
[3] = array(id=>...),
[22] = array(id=>...)
)
*/
现在我不确定如何继续。我知道如何构建一个准备好创建新的多条记录的表单(Model.{n}.fieldname),但是我怎样才能创建一个允许的“编辑”表单saveAll()
?
尝试遍历结果数组使表单关闭..但我看不到输入元素中字段的值..