Show/Hide images with logic condition

  • APLICATIVOFAMA
    Asked on November 26, 2019 at 9:35 AM

    I'm using a set of 4 images to represent a "progress bar". The bar will fill in thirds and, in the first of a total of 4 pages, there are 14 form fields to be filled. 

    1574778867chrome FH9lSPWgfI Screenshot 10


    I've crated a rule that, in every fifth field starting from the first, it would show the next stage of the progress bar and hide the last one. So, in this case, in the fifth field, it would show the bar at 33% and hide the bar that was 0%. Then, in the tenth field, it would hide the 33% one and show the 66%, until it reaches the 14th field and show the 100% bar.


    The rules I've set works for the first couple, but when I reach on the tenth field, it doesn't hide the 33% image, instead just showing the 66% one. The same goes for the 100% image. Below is a gif of what happens.


    1574778796form Screenshot 21


    These are the conditions:

    1574778854chrome DOp3x0ML2L Screenshot 32


    Link to form: https://form.jotformz.com/93006598898678

  • Victoria_K
    Replied on November 26, 2019 at 11:17 AM

    Hi!

    I think it is not working as expected because of conditional conflict. You should not add 'hide' conditions when a field is set to be shown with different condition. 

    Please try creating conditions like this:

    IF field 1 IS FILLED 

    and 

    IF field 2 IS EMPTY

    and 

    IF field 3 IS EMPTY

    Then 

    Show 33% image

    no 'hide' statement

    Same approach should be applied to all other images. 

    Please try and let us know how it goes for you.

  • APLICATIVOFAMA
    Replied on November 26, 2019 at 12:46 PM

    Considering the 0% image should be the first to be shown, and disappear upon completion of 33% of the form, at least one 'hide' statement should be used, no?


    Or should I program it to only be shown if all three fields are empty?

  • VincentJay
    Replied on November 26, 2019 at 2:53 PM

    It depends on what you want. Please let us know what you want and we will see if that is possible. 

    We'll wait for your reply. Thank you.

  • Victoria_K
    Replied on November 26, 2019 at 3:01 PM

    Hi again,

    Let me explain how conditions of show/hide type are designed to work at JotForm. 

    If there is 1 statement to show a field, that field will be only shown if the condition is met. If condition is not met, the field must be always hidden. In case if there is another condition to show or hide the same field, it is in a conflict with first statement. 

    That is why you should not create 'hide' statements for the opposite case. For 0% case, please set the condition if all three fields are empty

    Let us know how this works for you.