Validation errors are shown for all forms on page, instead of just for the submitted form.
Hi Bakers, I have multiple forms on single page/view, and upon submit, validation errors are shown for all forms, instead of just for the submitted form. This is because multiple forms contain identically named fields: User.email, User.password etc. How do I force Cake to display validation errors only for a form that has been submitted, and ignore other forms on the page? --~--~-~--~~~---~--~~ 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: Fatal error: Class 'Dispatcher' not found - please help
just clear your app/tmp/cache folder.always worked for me On Sep 27, 4:12 pm, 3lancer.eu [EMAIL PROTECTED] wrote: Oh, got it kind of working, the workaround was quite strange however: //this must be set on home.pl if (strpos('example.com', $_SERVER['SERVER_NAME']) !== false) { ini_set('include_path', '/app/..:/app:.'); define('APP_PATH', '/app'); define('CORE_PATH', '/'); } around line 77 in app/webroot/index.php. Maybe that will save someone hours of debugging. The strpos check is there only to allow running dev version on a separate domain where cake works fine... Regards, Piotr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Poor EmailComponent templating
Hi Andrey, Perhaps you should google around a bit. Most examples for EmailComponent I've seen mention how you're supposed to be using templates instead of passing email content through send(). Cheers бляпиздец ну лошара On Mar 6, 10:27 pm, Andrey Demenev [EMAIL PROTECTED] wrote: Hi all I was trying Cake today, building a prototype application (with 1.2.0.6311). Everything went pretty well until I wanted to send a confirmation email to the user upon registration. In register action, I have a bunch of values, some submitted by the user, and some generated (like account activation key). What I expected from EmailComponent is ability to pass these values to a template -- and was very surprised to see that is accepts email content as text. Was was the intent for doing it in such way? I think this approach adds nothing but an additional template level -- I need to use values I have to generate email content, while this job naturally should be done by template associated with EmailComponent. What I propose is to remove code from EmailComponent that joins lines passed in array together. This way, one can pass pre-generated email content to a template in a string or a bunch of values in an array --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Loosing HABTM with savefield ?
Before you do $data = $this-Article-read('published', $id ); add $this-Article-recursive = 0; Cheers On Mar 3, 2:00 pm, Mech7 [EMAIL PROTECTED] wrote: I have an article and tag model.. when i saved an article with tags it works fine, but i made a publish / unpublish function like below, but when i use it all habtm relations are deleted how can i prevent this? public function admin_publish($id) { $data = $this-Article-read('published', $id ); if( false === $data ) { return 0; } $other = $data['Article']['published'] == 0 ? 1 : 0; if( true == $this-Article-saveField('published', $other ) ) { if($other == 1) { $publish_text = 'published'; } else { $publish_text = 'unpublished'; } $this-Session-setFlash(Your article has been $publish_text.); $this-redirect('index'); } else { $this-Session-setFlash('Your article could not be published.'); $this-redirect('index'); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---