How to disable link on an image so it can't be clicked on the form?

  • Profile Image
    Nel
    Asked on January 27, 2018 at 04:44 PM

    I am using the Image Picker widget and then having the selected image appear in a text/html widget elsewhere on my form using the shortcode. ex. {image1}.

    The issue I am having is that the user can then click {image1} which takes them out of the form. I want to disable the ability to click this image but the CSS things I have tried are not working out.

     

    Thanks

  • Profile Image
    Jed_C
    Answered on January 27, 2018 at 09:27 PM

    I assume you were referring to this form's http://www.jotform.us/form/80218117284150 clickable image in the text/html element, correct? If so, what you can do is add the pointer-events: none; and cursor: default; as your style so image will not be clickable.

    Example:

    1517106334style_sample.gif

    Another thing is to target the exact div where the image loaded. For example, in the code below, the image is inside the "div#cid_8.form-input-wide", then add the same property and value to disable the click function of an image.

    div#cid_8.form-input-wide{

     pointer-events: none; 

     cursor: default;

    }

    Making your form as a sample, add the following CSS code below to disable the clickable action.

    div#cid_25.form-input-wide{

     pointer-events: none; 

     cursor: default;

    }

    Feel free to clone this sample form https://form.jotform.com/80267626901963.

    I hope that helps, let us know if you have any questions.

  • Profile Image
    nhamwey
    Answered on January 28, 2018 at 01:52 PM

    Thanks for the response, it works well.