Re: How can I display CakePHP input validation errors in a different container input
Do you mean something like this? http://milesj.me/blog/read/10/Displaying-Form-Errors-As-A-List-In-CakePHP On Aug 15, 8:35 am, euromark wrote: > if you bake your views/forms > this should be done automatically > > IF you set up your model relations accordingly anyway > maybe somethings wrong here > you should post your code for details > > On 15 Aug., 16:30, Petr Vytlaèil wrote: > > > Hi I will try to describe my problem better: > > > I have database tables addresses and user so i have two models User > > and Address. > > User haveone malingaddress (class Address) and billaddress (class > > Address) this is definate in model User. > > How is registration form where are inputs for information about user > > some: User.name, User.phone ... > > And inputs for Mailing and billing address: Mailingaddress.street, > > Billingaddress.street > > > -- now i want before save this data to database valid inputs with > > validations rules from model Address, source: > > > > > $this->Address->create($this->data['Maillingaddress']); > > if($this->Address->validate()$this->data['Maillingaddress']){ > > $this->Address->save($this->data['Maillingaddress']);} > > > And now when data arent valid a want show errors in form, but Form > > helper get errors for inputs in form from model and data model name > > isnt some as name input form: > > Address.street != Mallingaddress.street > > > Is any way how a cane prepare this errors and send to helper? > > > Have you understand? > > > On 15 srp, 10:10, "rez...@gmail.com" wrote: > > > > what's meant of redirect this errors for concrete input or group > > > inputs ? > > > really I want to help you > > > Sorry , I can't understand what you want 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: How can I display CakePHP input validation errors in a different container input
if you bake your views/forms this should be done automatically IF you set up your model relations accordingly anyway maybe somethings wrong here you should post your code for details On 15 Aug., 16:30, Petr Vytlačil wrote: > Hi I will try to describe my problem better: > > I have database tables addresses and user so i have two models User > and Address. > User haveone malingaddress (class Address) and billaddress (class > Address) this is definate in model User. > How is registration form where are inputs for information about user > some: User.name, User.phone ... > And inputs for Mailing and billing address: Mailingaddress.street, > Billingaddress.street > > -- now i want before save this data to database valid inputs with > validations rules from model Address, source: > > > $this->Address->create($this->data['Maillingaddress']); > if($this->Address->validate()$this->data['Maillingaddress']){ > $this->Address->save($this->data['Maillingaddress']);} > > And now when data arent valid a want show errors in form, but Form > helper get errors for inputs in form from model and data model name > isnt some as name input form: > Address.street != Mallingaddress.street > > Is any way how a cane prepare this errors and send to helper? > > Have you understand? > > On 15 srp, 10:10, "rez...@gmail.com" wrote: > > > > > what's meant of redirect this errors for concrete input or group > > inputs ? > > really I want to help you > > Sorry , I can't understand what you want 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: How can I display CakePHP input validation errors in a different container input
Make some deliberate input errors in your form, and then place this in your Address model code: die(debug($this->validationErrors)); This will show you the output of your validation errors array, and then you'll know what values to extract and display. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Aug 2010, at 15:30, Petr Vytlačil wrote: > Hi I will try to describe my problem better: > > I have database tables addresses and user so i have two models User > and Address. > User haveone malingaddress (class Address) and billaddress (class > Address) this is definate in model User. > How is registration form where are inputs for information about user > some: User.name, User.phone ... > And inputs for Mailing and billing address: Mailingaddress.street, > Billingaddress.street > > -- now i want before save this data to database valid inputs with > validations rules from model Address, source: > > > $this->Address->create($this->data['Maillingaddress']); > if($this->Address->validate()$this->data['Maillingaddress']){ >$this->Address->save($this->data['Maillingaddress']); > } > And now when data arent valid a want show errors in form, but Form > helper get errors for inputs in form from model and data model name > isnt some as name input form: > Address.street != Mallingaddress.street > > Is any way how a cane prepare this errors and send to helper? > > Have you understand? > > On 15 srp, 10:10, "rez...@gmail.com" wrote: >> what's meant of redirect this errors for concrete input or group >> inputs ? >> really I want to help you >> Sorry , I can't understand what you want > > 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 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: How can I display CakePHP input validation errors in a different container input
Hi I will try to describe my problem better: I have database tables addresses and user so i have two models User and Address. User haveone malingaddress (class Address) and billaddress (class Address) this is definate in model User. How is registration form where are inputs for information about user some: User.name, User.phone ... And inputs for Mailing and billing address: Mailingaddress.street, Billingaddress.street -- now i want before save this data to database valid inputs with validations rules from model Address, source: $this->Address->create($this->data['Maillingaddress']); if($this->Address->validate()$this->data['Maillingaddress']){ $this->Address->save($this->data['Maillingaddress']); } And now when data arent valid a want show errors in form, but Form helper get errors for inputs in form from model and data model name isnt some as name input form: Address.street != Mallingaddress.street Is any way how a cane prepare this errors and send to helper? Have you understand? On 15 srp, 10:10, "rez...@gmail.com" wrote: > what's meant of redirect this errors for concrete input or group > inputs ? > really I want to help you > Sorry , I can't understand what you want 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: How can I display CakePHP input validation errors in a different container input
Same here 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: How can I display CakePHP input validation errors in a different container input
what's meant of redirect this errors for concrete input or group inputs ? really I want to help you Sorry , I can't understand what you want 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: How can I display CakePHP input validation errors in a different container input
Nobody know solution? On 13 srp, 13:22, Petr Vytlačil wrote: > Hi is any way how i can display input validation errors in different > container input? > For examle a have model address and user model has deliver and billing > address sou a need in form for greate user account twice inputs for > address. > > $form->input(Deliveraddress.street); > $form->input(Deliveraddress.city); > > $form->input(Billingaddress.street); > $form->input(Billingaddress.city); > > Model address has set some validation rules and now i want save > deliveraddress and billingaddress and when i get some valid error i > wat show error i input pro deliver and billingaddress. > > Can i redirect this errors for concrete input or group inputs? > > THX 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
How can I display CakePHP input validation errors in a different container input
Hi is any way how i can display input validation errors in different container input? For examle a have model address and user model has deliver and billing address sou a need in form for greate user account twice inputs for address. $form->input(Deliveraddress.street); $form->input(Deliveraddress.city); $form->input(Billingaddress.street); $form->input(Billingaddress.city); Model address has set some validation rules and now i want save deliveraddress and billingaddress and when i get some valid error i wat show error i input pro deliver and billingaddress. Can i redirect this errors for concrete input or group inputs? THX 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