In a bootstrap modal
I have a file select input
which I want to be fired automatically just by opening modal. I tried many many different approaches, but none of them worked for me.
UPDATE: https://jsfiddle.net/bocc4f8d/
<div id="cropit" class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button id="close-modal-crop" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">{{ heading_title }}</h4>
</div>
<div class="modal-body">
<div id="image-cropper">
<div class="controls-wrapper text-center" style="margin-top: 15px;">
<input id="cropit-image-input" type="file" class="cropit-image-input custom" accept="image/*">
By opening modal, I want #cropit-image-input
to be clicked automatically.
I'd highly appreciate if you give me a hand.