Hi!

I have a form that submits it's data to a controller, which then
processes it (possibly in some complicated way) and saves it to a
database. Or even doesn't save it, just uses it to render view. The
point is that there is no direct relation between form fields and
database tables. How do I validate such form, while still having the
benefits of form helpers mentioned in tutorials (automatic toggling of
error messages, repopulating the fields with entered data). One idea I
have is to create the model with empty useTable var, and use it to
validate the form - but that's not entirely intuitive to me. Is it
okay (and "the MVC way") to do so, create such model for every form I
want to validate, or is there some other, preferred solution?

The other question is - there is a function that I want to be
accessible by two controllers (but not necessarily by every function
in the whole application, global variables and functions doesn't sound
too OOP). Where do I put it to make it possible?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to