setting attributes does not work, but setting content like this does
$newNote->content = $_POST['note']['content'];
is it possible attributes does not work unless it’s count is greater than 1?
<?php if(Yii::app()->user->hasFlash('note')): ?>
<div class="confirmation">
<?php echo Yii::app()->user->getFlash('note'); ?>
</div>
<?php else: ?>
<div class="form">
<?php echo CHtml::beginForm(); ?>
<?php echo CHtml::errorSummary($newNote); ?>
<div class="simple">
<?php echo CHtml::activeLabel($newNote,'content'); ?>
<?php echo CHtml::activeTextArea($newNote,'content'); ?>
</div>
<div class="action">
<?php echo CHtml::submitButton('Add Note'); ?>
</div>
<?php echo CHtml::endForm(); ?>
</div>
<?php endif; ?>
$newNote = new Note();
if (isset($_POST['note']))
{
$newNote->attributes = $_POST['note'];
//$newNote->content = $_POST['note']['content'];
$newNote->userId = Yii::app()->user->actualId;
$newNote->inspectionId = $inspection->id;
if ($newNote->save())
{
$this->refresh();
}
}
operating system = Windows 7
Web server = Apache
browser type = Chrome
Yii version or SVN revision = 1.1.0