how to get weekdays in drop down, with a default day selected.

2009-11-09 Thread cake

Hi all,

I want  the weekdays to be displayed in a drop down, with a default
day selected.
My code is as follows
echo $form-input('Weekday', array('options' = array
('Monday','Tuesday','Wednesday','Thursday', 'Friday','Saturday',
'Sunday')));
When I do like this it stores 0 value in database instead of day name.
Also I want to set a default selected weekday .
Please help!!!

Thanking you..
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to get weekdays in drop down, with a default day selected.

2009-11-09 Thread Kyle Decot

echo $form-input('Weekday', array('options' = array
('Monday'='Monday','Tuesday'='Tuesday','Wednesday'='Wednesday','Thursday'='Thursday',
'Friday'='Friday','Saturday'='Saturday',
'Sunday'='Sunday')));

On Nov 10, 1:04 am, cake dhanya@gmail.com wrote:
 Hi all,

 I want  the weekdays to be displayed in a drop down, with a default
 day selected.
 My code is as follows
 echo $form-input('Weekday', array('options' = array
 ('Monday','Tuesday','Wednesday','Thursday', 'Friday','Saturday',
 'Sunday')));
 When I do like this it stores 0 value in database instead of day name.
 Also I want to set a default selected weekday .
 Please help!!!

 Thanking you..
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---