var fields = [{
label: 'Two Columns',
attrs: {
type: 'twoCol'
},
icon: '❙❙'
}];
var templates = {
twoCol: function(fieldData) {
return {
field: '<div class="two-column-container"><div ondrop="drop(event)" ondragover="allowDrop(event)"></div><div ondrop="drop(event)" ondragover="allowDrop(event)"></div></div>',
onRender: function() {
// $(document.getElementById(fieldData.name)).rateYo({
// rating: 3.6
// });
}
};
}
};
defaultAttrs:{
'templatefile': {'label': 'Template File', 'value' : '', 'type': 'file'}
}
I'm working on a custom upload control, where there's a config option to upload a template file for the form filler to download and complete. What's the best method for attaching an onchange event handler to this file input (templatefile)?