Have just struck a minor inconvenience that I haven’t been able to resolve cleanly. Had to hack yii.activeForm.js to access the updateInputs function -code is working but obviously hacking a core file is the wrong solution - similarly I don’t want to duplicate large chunks of yiiActiveForm, and extending the plugin still wont gain me access to its locally scoped functions.
Am extending dosamigos\fileuploadui to use the UploadHandler.php server side handling of uploads - provided by http://blueimp.github.io/jQuery-File-Upload/ - the plugin that fileuploadui is encapsulating.
I think my use case is typical. Want to allow users to upload files at the same time as they submit a a form with .e.g. business details etc and perhaps a business logo, or sometimes a bunch of files relative to the particular ActiveRecord Model they are creating or updating.
jQueryFileUpload handles submit. Am merging ActiveForm:validate()'s return with UploadHandler.php’s return (blueimp) into a single json response and using a jQueryFileUpload callback to handle calling my hacked yiiActiveForm(‘updateInputs’, …) if form validation error or redirect if no upload errors.
All works perfect, but shouldn’t hack yii.activeForm.js to achieve this. Two options are that I should approach this differently, or the design of yii.activeForm.js hasn’t yet come across a use case for a requirement to access the currently locally scoped functions inside yiiActiveForm.js?