Changes
Title
unchanged
Additional form data with XUpload
Category
unchanged
How-tos
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:[...]