What do you get working when you type attributeName[$i]?
Maybe this has changed over time?!
I have been using Yii since 1.1.8 only. Since then:]
An easy way to check what goes on is to compare the file input's name and id that are output in your HTML code by Yii.
Another way is to check the source code of the method that is called in "the background": CUploadedFile::getInstance()
calls in fact CHtml::resolveName()
So you can see there's a difference between:
- [$i]attribute that generates names like Model[attribute] -> that is useful for tabular input : see here : http://www.yiiframew...1/en/form.table
- attribute[$i] that generates names like Model[attribute] -> that should not be very useful natively with Yii
Hope it helps
Ok, I've just though to compare with Yii 1.0 doc
and it says to use attribute[$i]
so I think the mystery is solved
This post has been edited by bennouna: 11 August 2012 - 07:16 AM