livermore
(Juanantonio Izaguirre)
March 31, 2012, 1:33pm
1
Please, can anybody help me with my problem
I would like to send 3 different models to the view, and then, with just 1 submit button in the view, come back to the controller to use all these data from the 3 models.
But I can no do it in a single view, as I read in the tutorial:
how-to-use-a-single-form-to-collect-data-for-two-or-more-models
because, sometimes I would like to send "model$a - model$b - model$c", and sometimes "model$a - model$b - model$d "
To clarify my idea, here you can find an simple schema. I split the url because I could not embed it.
h t t p://postimage.org/image/o9vdbk9tp/
Thank you for your responds! because I do not find a solution.
livermore
(Juanantonio Izaguirre)
March 31, 2012, 4:19pm
2
I solved it!
I was making a mistake. In each _form, i was calling:
<?php $form=$this->beginWidget('CActiveForm', array(
so, I delete it, and just call this Widget on the "general" view that has my 3 "renderPartial" and pass to them
'form'=>$form,
Anyway, sorry for my doubt
Diane
(Hwolfe20)
May 23, 2012, 8:50pm
3
livermore:
I solved it!
I was making a mistake. In each _form, i was calling:
<?php $form=$this->beginWidget('CActiveForm', array(
so, I delete it, and just call this Widget on the "general" view that has my 3 "renderPartial" and pass to them
'form'=>$form,
Anyway, sorry for my doubt
Thanks for posting your solution.
I was looking around for hours how to solve this exact problem until i chanced upon your post.
Thankz a lot.
Hi, can you share it more for me? coz i not really sure how to set this in controller, if($model->save()).