Show a field when you click at the picture

  • robin.tepe
    Asked on July 23, 2014 at 4:22 PM

    Can you add rules to pictures, like show a field when you click at the picture?

  • Jeanette JotForm Support
    Replied on July 23, 2014 at 7:03 PM

    That is not possible as for the moment. However, that seems to be a nice feature to implement to. Let me forward this to our devs, if they find this feasible to do it, it will be implemented soon.

    Kind regards

  • Jeanette JotForm Support
    Replied on July 23, 2014 at 7:10 PM

    Searching deeper, you can add a link to an image, and even set the Target as shown in the image.

    Show a field when you click at the picture Image 1 Screenshot 20

     

    However if this suggestion does not meet your requirement, then I'll definitely need to forward this to our developers.

     

  • robin.tepe
    Replied on July 24, 2014 at 3:20 AM

    It is not possible cause a photo does not have a name, like a checkbox, that shows up in the 'rules' so I can't give interactions like SHOW or HIDE.

    So if it wil developed the only thing we need is to show the name of the photo in the list with tools.

  • Welvin Support Team Lead
    Replied on July 24, 2014 at 7:22 AM

    How about switching the two, use a field (checkbox or radio or dropdown) then list down the name of the photos there. Based on the selected photo name, show the image to the form. This should work. Your thoughts?

    Thanks

  • robin.tepe
    Replied on July 24, 2014 at 7:43 AM

    Sure it will work but i want that the user can click at the photo and then open a field. I now have now put checkboxes under the pictures but that is not beautiful.

    For example take a look at my form (Set the language to English).

     

    Can you please show the pictures name in the rules?

  • jedcadorna
    Replied on July 24, 2014 at 9:49 AM

    You can use the image checkbox widget in this case so that your checkbox contains image and you can add a condition.

    You can set your condition something like this:

    Show a field when you click at the picture Image 1 Screenshot 30

    Here's a sample form:

    Show a field when you click at the picture Image 2 Screenshot 41

    Also, I forgot to add that there is a radio button image widget. Since checkbox allows you to select multiple, with radio buttons you can only have one selection.

  • robin.tepe
    Replied on July 24, 2014 at 9:59 AM

    I already tried that but there are 2 problems:

    1. I only want 45 x 45 pictures, so not that big (is the option available cause i didn't found)

    2. I want the picture is a line (like i did in my form).

     

    Is that passible or is it easier to intergrade pictures in the rules?

  • KadeJM
    Replied on July 24, 2014 at 11:54 AM

    I think you are referring to a picture size of 45px by 45px if I am correct? For the Image Checkbox Widget you can actually adjust the Image Sizes in the widgets wizard tool. 

    Show a field when you click at the picture Image 1 Screenshot 40

     

    As for your pictures all on the same line just make your widget field wider.

    Show a field when you click at the picture Image 2 Screenshot 51

    Result:

    Show a field when you click at the picture Image 3 Screenshot 62

  • robin.tepe
    Replied on July 25, 2014 at 2:31 AM

    Yes, that looks pretty nice. I did it but now I can't find out where you can hide/show fields like 'jedcadorna' did :'( Can someone explain that?

    And is it possible by CSS to delete the 'circle' by every picture from the widget? I don't like that.

  • jedcadorna
    Replied on July 25, 2014 at 5:27 AM

    Here's how to remove the border:

    Show a field when you click at the picture Image 1 Screenshot 60.

    Inject this css:

    li img { 
    border: none; border-radius: none;

    }

    And to remove the label inject add this to your css in your widget:

    Show a field when you click at the picture Image 2 Screenshot 71

    li label{
    visibility: hidden !important;
    }

    Show a field when you click at the picture Image 3 Screenshot 82

    To add condition just click on the condition button and choose "Show / Hide a form field".

    Show a field when you click at the picture Image 4 Screenshot 93

    Here's how I setup my sample condition:

    Show a field when you click at the picture Image 5 Screenshot 104

    You can test this form http://form.jotformpro.com/form/42051858076962.

  • Welvin Support Team Lead
    Replied on July 25, 2014 at 5:28 AM

    In addition, if you want to remove the borders of the selected image, you can use the following custom CSS codes:

    li.checked img {

    border: none !important;

    }

    Thank you! :)