• Resolved zedem

    (@zedem)


    Hi, well done on a great plugin. Its exactly what I was looking for. I have made a form in which employee details are captured. I have also included a photo upload field which would serve as the profile pic on the frontend for viewing. However, when viewing this “photo field” on the frontend it shows the filename of the picture that’s been uploaded and you have to click on it to view. Is there any way to have the picture load automatically on the frontend without having to click on its link?

    Thank you.

    https://ww.wp.xz.cn/plugins/gravity-forms-sticky-list/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author fried_eggz

    (@fried_eggz)

    Thanks for the kind words.

    This is not supported out of the box but can be easily achieved with JQuery.

    Provided that you have the “Make files clickable” checkbox selected you could use this code:

    jQuery(document).ready(function($) {
    	cell = $('.stickylist-fileupload a');
    	image = cell.attr('href');
    	cell.html('<img width="100" src="' + image + '">');
    });

    This will replace all clickable images with thumbnails. Note that you most likely will want to change the image width in the code to fit you needs.

    Note! For this to work you need to update Sticky List as i have made a small code change. No new version is released so you need to manually update the plugin by downloading it from here.

    Plugin Author fried_eggz

    (@fried_eggz)

    I’m going to mark this topic as resolved.

    Thread Starter zedem

    (@zedem)

    So sorry for the late response, been off work for a bit. Thank you for your response. I just have two further questions. Firstly, can I upgrade to the latest version or should I use the version you posted above? Secondly, where can I place the jQuery code? I’ve placed it under custom javascript (under my theme’s options) but couldn’t get it to work in this manner as it keeps breaking the theme.

    Thanks so much.

    Plugin Author fried_eggz

    (@fried_eggz)

    You can use this with the latest version.

    YYou need to make sure that this code runs when the page is loaded. It’s hard for me to tell you exactly how since it depends on your theme. Could you give me a temporary login to your site?

    EMail is [email protected]

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Image Thumbnail’ is closed to new replies.