Difference between #2 and #3 of
Additional form data with XUpload


Title unchanged

Additional form data with XUpload

Category unchanged


Yii version unchanged

Tags unchanged

xupload, File upload, form, widget, tutorial, How to

Content changed

1. Duplicate and edit the upload form template, so we can render the fields for the additional data
2. Duplicate and edit the download form template, so we can render the additioanl data
3. Create a controller action that will handle the file upload, and the additional data.
4. Adjust the widget in our view, and add the corresponding javascript

So, lets get started:
Before getting started, note that we will be using a custom model named Image, which will hold all the information submitted by the widget. in our case the additional attributes defined in this model are _title_ and _description_.

Duplicate and edit the upload form template
Duplicate and edit the updownload form template

To show the info in those fields after the files have been uploaded, we need to adjust our download template.

Assuming a default installation, the path to the template should be:
7 0
Viewed: 46 797 times
Version: 1.1
Category: How-tos
Written by: Asgaroth
Last updated by: Asgaroth
Created on: Sep 30, 2012
Last updated: 11 years ago
Update Article


View all history