Re: Form validation without model

2009-03-06 Thread rich...@home
How to do validation without a database table: You still need a model. For a concrete example, check out Snook's CakePHP contact form: http://snook.ca/archives/cakephp/contact_form_cakephp/ Where to put common controller functions? Create a component. Hope this helps On Mar 5, 11:00 pm, D4rko

Re: Form validation without model

2009-03-06 Thread Braindead
Yes, it is possible to use validation without a table. Simply define $useTable = false in your model and define the validation rules as if there was a table. You can then use cakes form helper without any problems. This is how you can force validation in your controller (part of my contact page):

Form validation without model

2009-03-05 Thread D4rko
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 va