Re: replace emty fields at model or controler level
If you want to display these values for users in form you _must_ do it
in view with placeholder input tags attribute. It's the only way to
display something to user and do not get affected by these values.
If you want to save these values in case of empty fields you should
fill it it somewhere like beforeSave() in model.
If you want not to save these values but display on pages (not forms)
you can check for empty fields in view or fill values somewhere like
afterFind() in model.
On 8 авг, 14:48, Johkke <gybels.j...@gmail.com> wrote:
> Is it possible to replace empty fields with an given string (like: 'No
> subject given') at model or controller level? I really like to keep
> the view as simple as possible
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home