I am having issues with how the conditional logic is designed when people change their selection

  • Profile Image
    Asked on April 08, 2019 at 08:33 AM

    First some background:

    My form allows parents to enroll their child in summer camp.  There are 11 weeks.  For pricing, the parent says whether they are a club  member or a guest.   For each of the  11 weeks there are two drop down list (one for members, one for guests). Conditions set  whether the member or the guest drop downs show.  The drop down contains enrollment choices for that particular week (fulll week, only Monday, Only Tuesday, etc.).

    To avoid having the parent wade through  the drop downs for all 11 weeks, I invented a "Week Picker"  which is a check box element that precedes the 22 drop down elements.  On the Week Picker the parent selects which weeks they are interested in.  Then, conditions in my form show/hide the enrollment drop downs based on the parent's Week Picker (and member/guest) choices.

    All that has been working great for several years.

    Now the design question:

    When a parent changes his/her mind after making Week Picker choices AND making a corresponding enrollment choice on the corresponding drop down (could be multiple checks on the Week Picker and drop down combinations) and despite instructions to the contrary, some of them return to the Week Picker and deselect the week there instead of returning to the week's drop down.  This leaves them still enrolled in that week.  To make matters worse, they can no longer see the drop down to properly deselect their choice there!  BAD!

    I am trying to show an error message if this condition happens.   However: the logic allowed on your conditions seems too limited to say: 

     IF  Week Picker is not equal to week1 and ((week1/member drop down is filled) OR (week1/guest drop down is filled) ) then show ERROR message text element.

    Can you help me find a way to detect this error condition...either with conditions or something totally different...short of totally redesigning the form.... which is otherwise OK.  Even if the above logic were possible, it's clumsy because it would have to be done 11 times.    This error does not occur often enough to justify totally redesigning the form, but if I can put up an error message, that would be nice. 


    Thanks for any advice you can offer.

    If you want to see an example, you can use my test form:   https://form.jotform.com/90956831263968

  • Profile Image
    Answered on April 08, 2019 at 10:29 AM

    In the Form Settings, you can set to Clear Hidden Field Values to Clear on Being Hidden. Setting this up should fix your problem without the need to add a conditional logic.

    This option will clear the field selection/entries in the hidden fields set by conditional logic. Please try that and let us know if the issue persists. You currently set this to Don't Clear which I think causing the problem.

  • Profile Image
    Answered on April 08, 2019 at 06:24 PM

    Fantastic!  It worked.   How simple can it be!!!

    Thanks for wading through my long winded description.

    Thanks again,


  • Profile Image
    Answered on April 16, 2019 at 06:34 PM

    After several days of using my forms with "Clear hidden field values" selected  (which solved the problem above), I've discovered an unintended consequence that presents a bug.  There is another radio button  field called Payment Choice that was being conditionally hidden (when the submitter identified themselves as "Guest").   A guest isn't supposed to be given the option of how to pay, so that Payment Choice card became hidden.   That Payment Choice field has a default selection of "PayPal...."  (one of the two radio buttons that make sense for members) .   In my overall application, VBA processing of your excel workbook was relying on that default choice "PayPal..." being there, even and especially for guests.   When I newly selected "Clear hidden field values", the default value was cleared.  That messes up this later processing of the excel workbook because the Payment Choice field is cleared.

    You told me that the clear occurs whenever a condition statement  causes the Payment Choice field to be hidden, so I tried re calculating  the Payment Choice field with a condition based on the setting of a required field later in the form's flow of cards....that would be after the initial clear.   However, the field values  condition  doesn't seem to allow making the value be one of the radio button choices.  

    So, I suspect this approach is not going to solve my problem.???

    Is there some way to keep the clear hidden value from clearing this field and not the others...that are desired to be cleared?  ....or as I tried....restoring the default choice. 

    ...or some other approach?

    I'd like to NOT add any field that upsets the excel workbook's column assignments.   

  • Profile Image
    Answered on April 16, 2019 at 10:04 PM

    Is there some way to keep the clear hidden value from clearing this field and not the others...that are desired to be cleared?

    If I understand correctly the latest issue, the Payment Choice (default selected PayPal) field should not be cleared by Conditions at ALL times.

    See image below

    1555466063zzz 2019-04-17 09.51.37.png

    Can you please confirm this first before we proceed.


    Additionally please check my comment on the conditions assigned to Payment Choice field.

    1555466470zzz 2019-04-17 09.56.58.png

    It is always better setting the conditions in affirmative. See example below on how it should be.

    1555466623zzz 2019-04-17 10.02.17.png

    We will wait for your updated response.

  • Profile Image
    Answered on April 16, 2019 at 10:35 PM

    Yes.  I want to have some (actually most) values that have been hidden  by a condition statement to be cleared, but not the Payment Choice field.  (Aside: I have other hidden cards that have values that are not mentioned in condition statements.  I don't want to have them cleared ... and I'm reasonably certain that they are NOT cleared.  )

    I have always chosen the Hide action because I assumed that if there was no condition statement that the default was to SHOW a card.    Namely, absent any any condition, a card shows. So to me it made sense to be explicit about hiding. 

    If I have a SHOW condition, do need a HIDE statement too?  One of your comments in orange:"What is the equivalent SHOW condition?" implies that I would need that.  However, that is not what I've experienced.   The design is that Payment Option card shows when Member is chosen and is hidden when Guest is chosen in the "NCSU Club Member" card.

    Are you perhaps heading toward implying that if a SHOW condition fails, that it hides, but since that explicit test was SHOW  (not HIDE)  that the hidden field is not cleared?  This would seem strange.   I'm confused.

    I have 5 forms that are in production mode so I would prefer not to redo so many condition statements if I am only improving "conventional" coding of condition statements...but it is otherwise working. I do have a new version coming out later where I could make more drastic changes...but I need a quickie solution to the current problem asap. 

    Thanks for digging into this.


  • Profile Image
    Answered on April 16, 2019 at 11:58 PM

    Unfortunately, if the "Clear on being hidden" is enabled, there is no option to avoid clearing the value of a specific field that is conditioned. Fields that are by default hidden through their properties are not affected by the "Clear on being hidden" setting.

    If I have a SHOW condition, do need a HIDE statement too?  

    No, there is no need for a HIDE condition. The field will be hidden until the condition that was created to show it is met.