I have a form with an input file, and what I want to do is the following.
WhenIchooseafileandhit"OPEN", I need to submit my form by clicking "OPEN".
My form.
<form class="form5" method="POST" enctype="multipart/form-data">
<input type="file" name="Foto_us_sn_user" value="" style="display: none;">
<input id="Bot_trocar_img_perf" type="submit" name="Trocar_foto_us_botao" value="Trocar">
</form>
<script>
$('img.img_perfil_trocar').click(() => {
$('[name="Foto_us_sn_user"]').click();
})
</script>