www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/
On 26 Okt., 22:26, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> That's pretty much what I'd do.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 26 Oct 2010, at 16:10, Dave Maharaj wrote:
>
>
>
>
>
>
>
> > How do you make a fake table. I need a select input which has 5 options (0-5, 5-10, 10-15, 15-20, 20+) as options and this will never change so it seem overkill to make a db table just for that.
>
> > I also need to validate against the submitted data for valid option so what would be the best way to approach this? The select options will be used in various places also.
>
> > I figured it would be easy enough to just define a set var in app_model like $_select_options = array( '0-5', '5-10', '10-15', '15-20', '20+');
>
> > Then place $_select_options into the form and simply validate with in_array( $submitted['Model']['data'], $_select_options);
>
> > Ideas?
>
> > Thanks
>
> > Dave
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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+unsubscribe@googlegroups.com For more options, visit this group athttp://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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment