Contact Form 7
Image upload preview (1 post)

  1. tomi35
    Posted 4 years ago #


    I want to make a form with the contact form 7 plugin and i want to make in the dorm an uploader input to upload images and I want to insert a preview to the end of the form. I have a javascript code for this:

    <script type="text/javascript" src="http://iphonefanatic.hu/wp-content/themes/classipress/js/jquery.min.js"></script><br />
    <script type="text/javascript">
    function onFileLoad(e) {
        $('#preview').append('<img class="preview" src="'+e.target.result +'"/>');
    function displayPreview(files) {
        var reader = new FileReader();
        reader.onload = onFileLoad;

    and the picture appears where the <span id="preview"></span> code

    It's only working when I put the page's source to an HTML file.

    Can anyone help me?

    (sorry for my bad english)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic