i want edit more posts on 1 edit page. cookbook there in every post row 3 actions, edit, view , delete.
but need create 1 edit page group of posts , there want edit them.
in controller fetched rows need (2 rows of posts).
$posts= $this->post->find('list', array('conditions' => array('task_id' => $taskid)));
then throw foreach filled data:
$this->request->data[$i]
and in view when debuging
foreach ($this->request->data $key => $value) {debug($value);}
with these 2 post data arrays: array(1) , array(2)
but don't know how edit them in forms. tried put (vulgaris) edit rows in foreach 2 same forms(with data array(1))
foreach ($this->request->data $key => $value) { echo $this->form->create('post'); echo $this->form->input('id'); echo $this->form->input('task_id'); echo $this->form->input('note'); echo $this->form->input('priority'); echo $this->form->input('results_link'); echo $this->form->end(__('submit')); }
i don't know put $value foreach.
these example of form. posts because posts in cookbook.
and maybe knows if have problem when need save edited arrays of data. (use 1 submit on end of form or in every row 1)
resolved with: (need turn brain on)
foreach($this->request->data $key => $this->request->data){}
Comments
Post a Comment