Hello
This my view/form :
....
echo $form->fileFieldRow($model, 'uploaded_file', array('class' => 'span5'));
....
<?php
$this->widget('bootstrap.widgets.TbButton', array(
'buttonType' => 'submit',
'type' => 'primary',
'label' => $model->isNewRecord ? 'Create' : 'Save',
));
?>
<?php
echo ' ';
echo CHtml::ajaxSubmitButton(
'Save and continue >', 'createajax', array(
), array(
'id' => 'assign-row-button_' . uniqid(),
'class' => 'btn btn-info assign_row',
'live' => true
));
?>
Controller :
public function actionCreate(){
$model=new FiFiles;
if(isset($_POST['FiFiles'])){
..
$file = CUploadedFile::getInstance($model, 'uploaded_file'); //Here It is WORKING!
...
}
}
But when I am using Ajax :
public function actionCreateAjax() {
$model=new FiFiles;
if(isset($_POST['FiFiles']))
$file = CUploadedFile::getInstance($model, 'uploaded_file'); //HERE IS NULL!!
}
}
Can Anyone Help please