How to change images in one field based on answers in earlier fields?

  • inteez
    Asked on November 6, 2017 at 1:32 AM

    Hi everyone,

    I need to change answer images in a question - let's say question #5- based on answers from question#2 and #3.

    How can I use conditions to achieve that? Can a widget help with this?

    Thanks.

  • Nik_C
    Replied on November 6, 2017 at 5:03 AM

    You can do that by adding additional fields and then conditionally show/hide them, for example:

    1) Let's say you have these two blocks:

    1509962388Screen Shot 2017 11 06 at 11 Screenshot 10

    And you want to show each, based on what is selected in this field:

    1509962469Screen Shot 2017 11 06 at 11 Screenshot 21

    2) You can create conditions like this:

    1509962587Screen Shot 2017 11 06 at 11 Screenshot 32

    You can check my test form here: https://form.jotform.com/73091838451965

    Let us know if that could work for you.

    Thank you!

  • inteez
    Replied on November 6, 2017 at 6:32 AM

    Thanks Nik for your quick response.

    I was thinking of implementing your suggestion before I wrote my post.
    But his approach has a problem: I have to create in advance a block for each combination of paired answers with images.

    That's why in my post, I underlined that "I need to change answer images in a question"

    Let me explain:
    1. I ask users to choose 1 of two photos, for 16 pairs of photos.
    2. Then I take each of the "winning photos" - 8 in that case - and create new pairs - 4 pairs in that case
    3. I ask users to choose 1 of two photos in each of the new pairs.
    4. Then I take each of the "winning photos" - 4 in that case - and create new pairs - 2 pairs in that case
    5. I ask users to choose 1 of two photos in the new pairs.
    6. Then I take each of the "winning photos" - 2 in that case - and create 1 last pair
    7. Finally, I ask the user to select THE winning photo

    The problem with using blocks in that scenario, is that I have to predetermine each pair in each block in advance and Hide/Show them according to answers.

    That's dozens of predetermined pairs in blocks. It's very inefficient and updating/duplicating the form, which we need to do, becomes a nightmare.

    If I can just carry on the selected image as an answer into the next level of pair, the form is much simpler.


    Does it make sense?


    Thanks.

  • Elton Support Team Lead
    Replied on November 6, 2017 at 9:30 AM

    Thanks for the clarification. We completely understand what you want now. Unfortunately, we do not have a widget with that functionality. The only workaround is to predefined all those fields and show/hide them via conditions similar to what my colleague has offered. I understand it's going to be labor intensive but it would definitely work. I'm afraid this is the only workaround at the moment. If we can be of further help, just let us know.

    By the way, there is a close, almost similar widget but the downside is that it does not have conditions which means it can't take previously selected images. I am referring to this widget https://widgets.jotform.com/widget/image_choices.

    Thanks

  • inteez
    Replied on November 6, 2017 at 9:43 AM

    Thanks for your reply Elton.

    I can tinker with programming. Can I create a widget to achieve the desired outcome?

    If so, is there documentation to do so?

    Thanks

  • Kiran Support Team Lead
    Replied on November 6, 2017 at 11:32 AM

    If you want to create a widget, you may create one from the following URL.

    https://developers.jotform.com/

    The API documentation is available at http://api.jotform.com/docs/. If you need any assistance with the API, you may email at api@jotform.com

    Thank you!