Hi !
I would like to create a list of year, and select the year of my user
when i edit it. My field in my database is `class_year`, which is a
YEAR(4) type. my view code is :
debug($membre['Membre']['class_year']);
$a = array('type' => 'date',
'selected' => $membre['Membre']
['class_year'],
'dateFormat' => 'Y');
debug($a);
echo $form->input('class_year', $a);
which displays :
app/views/membres/edit.ctp (line 13)
1997
app/views/membres/edit.ctp (line 17)
Array
(
[type] => date
[selected] => 1997
[dateFormat] => Y
)
and no option tag is set as "selected" on my select. Especially not
the 1997 one...
Did I do something wrong ?
Thanks !
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---