scenario:
fresh joomla installation j3.x
fresh component (no hacks), just added few more fields manually in the form.xml.
the JDOM.html.form.input.file doesn't work properly on a j3.x installation with bootstrap.
Firstly the trigger to select the file doesn't work (line 394) then after fixed that, the "fake" bootstrap input field is not updated when I select the file (line 429).
on the file: administrator\components\com_mycomponent\dom\html\form\input\file\default.php
the line 394 and 429:
394:
'link_js' => 'jQuery(\'input[id=' . $id . ']\').click();',
429:
$js = "jQuery('input[id=" . $id . "]').change(function() {
for some reason (I didn't investigate yet) it doesn't work to me.
but it perfecly works if I change to (what should be the same):
394:
'link_js' => 'jQuery(\'input[id=' . $id . ']\').trigger('\'click\);',
429:
$js = "jQuery('input[id=" . $id . "]').on('change', function() {
UPDATE:
after I added those modifications, if I have more file fields in the form ONLY the first work, I don't know for what reason (too tired today to investigate why), I had to modify the line 407, adding the following code (the default addscriptdeclaration didn't work, it works only ONCE):
$html .="
<script type=\"text/javascript\">
jQuery(document).ready(function(){
jQuery('input[id=" . $id . "]').on('change', function() {
jQuery('#" . $idView . "').val(jQuery(this).val());
});
});
</script>
";
and bypass the function buildJs() , in this way everything works. tomorrow I'll take a look more deeply why.