Changes
Title
unchanged
XUpload Workflow
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
xupload, Forms, Widgets, tutorial
Content
changed
[...]
------------------
First we need to create the action that will show the form to the user:
```php
// application/controllers/FancyController.php
public function actionForm( ) {
$model = new SomeModel;
Yii::import( "xupload.models.XUploadForm" );[...]
```php
// application/views/fancy/form.php
<fieldset>
<?php
$form = $this->beginWidget('CActiveForm', array([...]
```php
<?php
// application/controllers/FancyController.php
public function actionUpload( ) {
Yii::import( "xupload.models.XUploadForm" );
//Here we define the paths where the files will be stored temporarily[...]
```php
<?php
// application/controllers/FancyController.php
public function actionForm( ) {
$model = new SomeModel;
Yii::import( "xupload.models.XUploadForm" );
$photos = new XUploadForm;
//Check if the form has been submitted
if( isset( $_POST['SomeModel'] ) ) {[...]