I have a simple form:
<?php
echo $form->input('Platform', array('multiple'=>'checkbox','label'=>false,
'div' => false));
echo $form->input('Addition.aplatform');
?>
The 'Platform', array('multiple'=>'checkbox','label'=>false, 'div' =>
false)); is a HABTM relationship
the 'Addition.aplatform'); is a hasOne
The HABTM is saving but not the data entered into the aplatform field.
The controller save function is just this:
if (!empty($this->data)) {
if ($this->User->saveAll($this->data,
array('validate'=>'first'))) {
$this->Session->setFlash(__('Your information has been
saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The User could not be
saved. Please, try again.', true));
}
}
When i load the page with the form in it the data is there for all the
checkboxes and the aplatform field...just wont save the field.
Where did I go wrong here?
Dave
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---