[x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
[x] The issue still exists against the latest master branch of yii2-builder.
[x] This is not an usage question. I confirm having gone through and read the documentation and demo.
[x] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
[x] I have attempted to find the simplest possible steps to reproduce the issue.
[ ] I have included a failing test as a pull request (Optional).
Steps to reproduce the issue
Add a INPUT_FILE field type in a TabularForm widget, for related models.
Open the form in browser.
You will see a javascript error.
Expected behavior and actual behavior
When I follow those steps, I see...
Uncaught TypeError: self.previewCache.data.content.filter is not a function
at Object.fetch (fileinput.js:608)
at Object.count (fileinput.js:614)
at FileInput._initPreview (fileinput.js:1171)
at FileInput._init (fileinput.js:329)
at new FileInput (fileinput.js:239)
at HTMLInputElement.<anonymous> (fileinput.js:3417)
at Function.each (jquery.js:365)
at jQuery.fn.init.each (jquery.js:137)
at jQuery.fn.init.$.fn.fileinput (fileinput.js:3405)
at HTMLDocument.<anonymous> (update?client=ChrysCapital+VI.+LLC&traveller_name=Test+Traveller:1218)
I was expecting...
The file input to work correctly. I think a part of the problem may be absence of enctype attribute for the tabular form (at least it is not documented anywhere if it is present).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Prerequisites
master
branch of yii2-builder.Steps to reproduce the issue
Expected behavior and actual behavior
When I follow those steps, I see...
I was expecting... The file input to work correctly. I think a part of the problem may be absence of enctype attribute for the tabular form (at least it is not documented anywhere if it is present).
Environment
PHP v5.6.28 on Mac OS X 10.12 using MAMP server
Browsers
Operating System
Libraries
Isolating the problem