Re: Problem with form creation after upgrade to 1.2.7
So let me rephrase the question : how can I override the controller is used in the form's url ? ?php echo $form-create('CautareProduseVechi',array('url'='/new_admin/ cautare_produse_vechis/cautareProduseVechi', 'id' = 'CautareProduseVechiAddForm')); http://api.cakephp.org/class/form-helper#method-FormHelpercreate 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
Problem with form creation after upgrade to 1.2.7
Hello guys, I have upgraded from cakephp 1.2.0.4451alpha to 1.2.7 , so that my application works with php 5.3. Now some of the forms no longer work. It looks as if the behavior of FormHelper-create has significantly changed. For example, one of the controllers is called 'Intretinere' and has actions 'index' and 'cautareProduseVechi'. The index.ctp has this line : ?php echo $form- create('CautareProduseVechi',array('action'='cautareProduseVechi'));? This generated html code is : form id=CautareProduseVechiCautareProduseVechiForm method=post action=/new_admin/cautare_produse_vechis/cautareProduseVechi The old 1.2.0 was generating : form id=CautareProduseVechiAddForm method=post action=/new_admin/ intretinere/cautareProduseVechi Please help me understand how should I rewrite the form-create() so that I can get the same url that was generated in 1.2.0. 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
Re: Problem with form creation after upgrade to 1.2.7
On Wed, Jun 16, 2010 at 5:53 PM, syra...@googlemail.com syra...@googlemail.com wrote: The index.ctp has this line : ?php echo $form- create('CautareProduseVechi',array('action'='cautareProduseVechi'));? This generated html code is : form id=CautareProduseVechiCautareProduseVechiForm method=post action=/new_admin/cautare_produse_vechis/cautareProduseVechi The old 1.2.0 was generating : form id=CautareProduseVechiAddForm method=post action=/new_admin/ intretinere/cautareProduseVechi A tip: don't bother with that. Let Cake abstract this for you. If you really really want, you can set attribs for your form. ?php echo $form-create('CautareProduseVechi',array('action'='cautareProduseVechi', 'id' = 'CautareProduseVechiAddForm')); Best regards. -- MARCELO F ANDRADE Belem, Amazonia, Brazil I took the red pill 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
Re: Problem with form creation after upgrade to 1.2.7
On Jun 17, 5:30 pm, Marcelo F Andrade mfandr...@gmail.com wrote: On Wed, Jun 16, 2010 at 5:53 PM, syra...@googlemail.com syra...@googlemail.com wrote: The index.ctp has this line : ?php echo $form- create('CautareProduseVechi',array('action'='cautareProduseVechi'));? This generated html code is : form id=CautareProduseVechiCautareProduseVechiForm method=post action=/new_admin/cautare_produse_vechis/cautareProduseVechi The old 1.2.0 was generating : form id=CautareProduseVechiAddForm method=post action=/new_admin/ intretinere/cautareProduseVechi A tip: don't bother with that. Let Cake abstract this for you. If you really really want, you can set attribs for your form. ?php echo $form-create('CautareProduseVechi',array('action'='cautareProduseVechi', 'id' = 'CautareProduseVechiAddForm')); I am not trying to set the form attributes . I am seeking a solution for fixing the broken url that gets loaded at form submit. In cakephp 1.2.0 the correct url was :action=/new_admin/ cautare_produse_vechis/cautareProduseVechi In cakephp 1.2.7 the broken link is :action=/new_admin/ intretinere/cautareProduseVechi The current page is intretinere/index , so the form url should change only the action , not try to use a wrong unexisting controller. So let me rephrase the question : how can I override the controller is used in the form's url ? 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