Solved

Images not "clickable" on desktop version

  • 7 September 2016
  • 1 reply
  • 26 views

Badge +2

In Nintex forms for SharePoint 2013 you can add images into your forms. We are using this to show examples of posters that need to be confirmed that they exist. On the mobile and tablet version of the form the images are "clickable" and open up a larger view of the thumbnail. Is there a way to do this to the images on the desktop?

 

I've looked into making them buttons and using JavaScript to open the image URL (this does work on desktop), however doing this would mean extra work since the buttons wouldn't show up on Mobile and Tablet ( I would have to duplicate all the buttons with images for mobile and tablet). 

icon

Best answer by maria_spalding 8 September 2016, 16:29

View original

1 reply

Badge +2

I have found a solution. 

First, make sure you have jQuery included in your Advanced -> Custom JavaScript Includes section of the form settings.

Second, in the Custom Javascript settings of the form, add the following line:

NWF$("img.nf-image").click(function(){window.location.href = NWF$(this).attr("src");});

 

This should make any image put into your form clickable to the image source. If you want to make it appear clickable by showing a mouse pointer on roll over, also put the following into the Custom CSS section of the form settings:

 

img.nf-image{cursor:pointer;}

Reply