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 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 [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