Preloading Gravity Images

I created a contact form using the "Gravity Form" in which I used the image downloader. Now I want to display a preview image for the user who is loading. Anyway to achieve this?

+5
source share
1 answer

Sorry, late reply

<script> jQuery('#imgview').hide(); function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); jQuery('#imgview').show(); reader.onload = function (e) { jQuery('#imgview>img').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } // your File input id "#input_1_2" jQuery(document).on("change","#input_1_2", function(){ readURL(this); }); </script> 

html block

 <div id="imgview"><img src=""></div> 

enter image description here

+3
source

All Articles