というテーブルがありますspecs
。そこから複数の行を 1 つのフォームで編集し、一度に保存する必要があります。
// 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()
ですか?
結果配列を反復しようとすると、フォームが閉じます..しかし、入力要素のフィールドの値が表示されません..