That was my best guess. Sorry :)

Take a look at the view source cod after you populate your form just before
submission and maybe you'll spot  something there. Or, make a debug after
you submit your form and see what data is passed to the controller.


On Thu, May 20, 2010 at 8:00 PM, kryska <kryskasan...@gmail.com> wrote:

> Yes , i do.
>
> first I create the form:
>  $form->create(array('controller'=>'Detallemenu','action'=>'add'));
>
>
>  afert i have:
> <div id="divupdate"> </div>
>
> And at the end:
> $form->end(array('label'=>'Crear Menú','class'=>'button'))
>
>
> In fact, if i write $this->element('mielement') inside the div, it
> works!
>
> But i dont know why it doesnt work if i do itdynamically....!!
>
> Thank you!
>
> On 20 mayo, 18:42, Andrei Mita <andrei.m...@gmail.com> wrote:
> > Do you load the elements in between form->create and form->end?
> >
> >
> >
> >
> >
> > On Thu, May 20, 2010 at 6:01 PM, kryska <kryskasan...@gmail.com> wrote:
> > > Hi!
> > > There is a view with a form inside.
> > > Two dropdown lists; depending on the first value selected, fill the
> > > second dropdown. And depending on the value selected on the secon
> > > dropdown, i load different elements.ctp inside a div. Finally, i end
> > > the form:
> >
> > > echo $form-
> > > >create(array('controller'=>'Detallemenu','action'=>'add'));
> > > echo $form-
> > >
> >select('seccion_id',array($secciones),null,array('id'=>'secciones'),Select
> > > one type..')
> > > echo $form->select('tipo_id',array(),null,array('id'=>'tipos'),'Select
> > > one type..')
> >
> > > echo $ajax->observeField('secciones',array('url'=>"http://127.0.0.1/
> > > elmolinodesanlazaro.com/prueba/adm/Menus/
> > > update_tipo_select",'update'=>'tipos'));
> >
> > > echo $ajax-
> >
> > >
> >observeField('tipos',array('url'=>'actualizarCarta','update'=>'divupdate')­);
> >
> > > <div id="divupdate"> </div>
> >
> > > The action in the controller to load an element.ctp inside the div:
> >
> > > function actualizarCarta($id = null) {
> > >        $tipo_id = $this->data['Detallemenu']['tipo_id'];
> > >        $options = $this->Detallemenu->Tipo-
> > > >find('list',array('fields'=>'Tipo.nombre','conditions'=>array('id'=>
> > > $tipo_id)));
> > >                $stringNombre = implode(',', Set::extract($options,
> > > '{n}.Tipo.nombre'));
> > >        array($this->render(null, 'ajax', '/elements/'.$stringNombre));
> }
> > > echo $form->end(array('label'=>'Crear Menú','class'=>'button'))
> >
> > > Everything works except that do not save the fields that are inside
> > > the element.ctp
> > > If the element is not loaded dynamically, (if i write inside the div:
> > > $this->element('mielement') ), it saves the fields inside the view and
> > > inside the element..
> > > But by loading dynamically, it only saves the fileds inside the view,
> > > but it do not save the fields inside the element...
> >
> > > Please, any help would be awesome..i`m going crazy with this!
> >
> > > Thank you!
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>
> <cake-php%2bunsubscr...@googlegroups.c­om>For more options, visit this
> group at
> > >http://groups.google.com/group/cake-php?hl=en
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> with their CakePHP related questions.
> >
> > You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en- Ocultar texto de la cita -
> >
> > - Mostrar texto de la cita -
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to