0
I have a form with an input file, and what I want to do is this.
When I choose a file and press "OPEN" I need my form to be sent 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>
Gives an Submit in the format when the file input changes
– edson alves
$(''input). on('change', Function(){$('form').()})
– edson alves
It worked, if you want to put as an answer for me to mark just put there.
– EDGNoizy