On Mar 11, 12:49 am, Matthieu <[email protected]> wrote:
> Hi!
>
> Id like to choose a default value for this form element et I dont know
> how? (exemple: defautl value: 01-01-1980 of Day-Month-YearÉ
>
> echo $form->input('birthdate', array('dateFormat' => 'DMY',
> 'timeFormat' => 'none', 'minYear' => date('Y') - 100, 'maxYear' => date
> ('Y') - 6));
>
> thks
Have you tried setting the 'default' or the 'selected' key?
For example:
echo $form->input('birthdate', array('dateFormat' => 'DMY',
'timeFormat' => 'none', 'minYear' => date('Y') - 100, 'maxYear' => date
('Y') - 6, 'selected' => date("Y")));
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---