I am having trouble saving a field in a form using $form->year. I am
using cake_1.2.0.7692-rc3.
I want to create a drop-down list for users to choose the year a movie
was released.
I have the following code in my form:
echo $form->year('movie_year', 1930, date('Y'), date('Y'), array(),
false);
I get the following error:
Warning (512): SQL Error: 1054: Unknown column 'Array' in 'field list'
The mysql insert looks like this:
INSERT INTO `movies` (`movie_year`) VALUES (Array)
The html source looks like this:
<select name="data[Movie][movie_year][year]" id="MovieMovieYearYear">
<option value="2008" selected="selected">2008</option>
<option value="2007">2007</option>
etc.
It seems to me the FormHelper should create:
<select name="data[Movie][movie_year]"
I would appreciate some help. Am I doing something wrong? Are there
special naming conventions when you are using $form->year. Is this a
bug?
Thank you.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---