Weird Save Problem
I have 1 form (element) used for add / edit and a year select option:
<?php echo $form->year(
'year_rec',
1980,
2010,
$selected = NULL,
$attributes = array (
'label' => false,
'div' => false,
'empty' => false) );?>
Now when I save I end up with [‘Model’][‘year_rec’][‘year’] so I just fix that in model beforeSave
$this->data[‘Model’][‘year_rec’] = $this->data [‘Model’][‘year_rec’][‘year’];
When I edit a record all goes as planned, when I add a record where the year should appear I get Array
I don’t know why when adding a new record it does not work yet it’s the exact same thing I’m using in other model with select inputs and they all work on Add / Edit.
Puzzled….
Ideas?
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home