Conditional logic not working on form

  • sstte18
    Asked on October 16, 2017 at 9:06 PM

    Please take a look at this form and the logic that I created.  I can't figure out why the "total credit card charge" and the "TOTAL check charge" are showing before the person has selected which event they are going to OR which payment method they are choosing.  I want these fields hidden and ONLY shown if they RSVP to BOTH events and have an amount for each. (ex. for breakfast, a person can choose NOT to pay and then there would be no amount owed.  in that case, if they RSVP to breakfast and chanukah event, they would ONLY see "total amount owed (by check OR by cc) for rockin' chanukah")

  • Mike
    Replied on October 16, 2017 at 10:55 PM

    I have added the next two conditions to your form.

    Conditional logic not working on form Image 1 Screenshot 20

    Please check if the "TOTAL Credit Card Charge" and "TOTAL Check Amount" are displaying properly now.

  • sstte18
    Replied on October 17, 2017 at 9:51 AM

    perfect!  thx so much!  I had previously created a similar condition but I guess I was missing the credit card condition from the above.

  • sstte18
    Replied on October 17, 2017 at 10:24 AM

    I had to add another event.  Need help again.  Now the logic for the breakfast isn't working.  Even if someone says "no" the check field is totaling and it shouldn't.  This is happening if one has already selected another event and then ADDS the breakfast.

     

    Also, the TOTAL check amount isn't showing up now that I've added the breakfast.  Pls help.

  • aubreybourke
    Replied on October 17, 2017 at 12:23 PM

    The reason for this is because your form is set to clear hidden field values on submit. So if you fill out the form and say select 2 breakfasts then reload the page. It looks like a fresh page. But the 2 breakfasts are hidden and the form remembers what was previously entered. 

    The solution for this is to either submit the form (so the fields are cleared). Or you can select clear on being hidden in you form settings.

    1508257347Microsoft Edge 17 10 2017 17 2 Screenshot 10

  • sstte18
    Replied on October 17, 2017 at 6:41 PM

    can you please provide specific instructions as to how to add that to the form settings?  I don't see that.

  • sstte18
    Replied on October 17, 2017 at 6:44 PM

    never mind I found it but it still doesn't work.  and now the calculation fields are not working.

  • sstte18
    Replied on October 17, 2017 at 7:01 PM

    in fact when I put that setting back to "clear on submit", the calculation fields work again.  Back to the above issue:

    I had to add another event.  Need help again.  Now the logic for the breakfast isn't working.  Even if someone says "no" the check field is totaling and it shouldn't.  This is happening if one has already selected another event and then ADDS the breakfast.

    Also, the TOTAL check amount isn't showing up when someone selects the breakfast AND one of the other events.  Pls help.

  • Mike
    Replied on October 17, 2017 at 8:19 PM

    Is this 'Would you like to pay the OPTIONAL admission . . .' field is supposed to be displayed for each option, or only when the 'Breakfast 10/29' option is checked?

    Conditional logic not working on form Image 1 Screenshot 20

  • sstte18
    Replied on October 17, 2017 at 8:31 PM

    only when the breakfast is checked.

  • Mike
    Replied on October 17, 2017 at 9:58 PM

    In this case, you may need to rework the calculations to use conditional calculation formulas instead.

    For example, calculate the 'Your Check Total for Brotherhood Breakfast' only when the 'Would you like . . .' option is set to 'Yes'.

    Conditional logic not working on form Image 1 Screenshot 30

    Remove the calculation formula from the field, so the result for 'No' will be a default 0.00 value.

    Conditional logic not working on form Image 2 Screenshot 41

  • sstte18
    Replied on October 17, 2017 at 10:18 PM

    I don’t love that solution. I would like that field not to show at all if the answer is “no”. It works when that’s the only event the person RSVPs to. It doesn’t work when the breakfast is the 2nd or 3rd event being rsvpd to. DO you have another solution?  If not, I’m better off dividing that one event out onto it’s own form, I think. Do you agree?

  • candy
    Replied on October 18, 2017 at 5:03 AM

    I have cloned your form named "Brotherhood RSVPs" in order to investigate the issue. 

    We have the option of "Ignore Hidden Fields" in the Form Calculation widget. So, if you set a show/hide condition to the fields and enable that option, the calculation will be made accordingly.

    1508317179Screen Shot 2017 10 18 at 11 5 Screenshot 10

    Besides, I couldn't understand exactly which field do you want to set hidden if the answer is "No" in the "Would you like to pay the OPTIONAL admission fee of $5/person..." question?

    So, if the answer is NO, set a condition to hide that field and also enable "Ignore Hidden Fields" option in the form calculation widget. So, the price will not be evaluated.

    I hope this helps.

  • sstte18
    Replied on October 18, 2017 at 7:44 AM

    So, two things:

    1) if the answer to "would you like to pay the OPTIONAL admission fee" is "no", then whether or not someone RSVPs "yes" to any of the other events, the "Your cc or check total for breakfast" should NOT be seen at all and should NOT be calculated into the "TOTAL Check" "TOTAL credit card" fields.  I hope that clarifies.

    2)  I clicked ignore hidden fields and by doing so, the "amount billed to cc" didn't show up AT ALL when I checked just "brotherhood dinner" and pay by cc.

    3) When you tell me to set a condition to hide a field, can you please give me specific instructions b/c I feel like I've tried that route and it didn't work.

  • candy
    Replied on October 18, 2017 at 9:36 AM

    I have two questions related to your explanation as you can find them below: 

    Regarding "..then whether or not someone RSVPs "yes" to any of the other events," I do not see the field related to "someone RSVP's..." type of selection.

    Regarding "the "Your cc or check total for breakfast" should NOT be seen at all and should NOT be calculated into the "TOTAL Check" "TOTAL credit card" fields.": I assume you want to set whole payment hidden and do not want to receive payments.

    So, I have added 2 section collapses to the form, one of them for hiding payment section, the other is for submit button.

    1508332791Screen Shot 2017 10 18 at 4 19 Screenshot 10

    I have arranged section and button visibility of the Payment Section as the following:

    1508333002Screen Shot 2017 10 18 at 4 Screenshot 21

    Then, I have set a condition in order to hide whole payment section, if the if the answer to "would you like to pay the OPTIONAL admission fee" is "no" as seen below:

    1508332819Screen Shot 2017 10 18 at 4 Screenshot 32

    So that, when selecting "No", whole payment section will disappear and then the user is able to submit the form without entering any credit card or check information as seen below:

    1508333060Screen Shot 2017 10 18 at 4 Screenshot 43

    Please find my test form at the following URL in order to check: https://form.jotform.com/72902178723964 

    Feel free to clone and use on your side.

    I didn't touch form calculation widgets in this way, so hopefully, pricing will be calculated correctly as you have already set.

    I hope this helps. Please test and let me know if everything is fine.


  • sstte18
    Replied on October 18, 2017 at 9:54 AM

    Thank you for this. Big problems though 


    - select JUST breakfast and NOTHING shows up

    - select other events first and then add breakfast and select no and the entire payment field goes away. When someone says no to the optional admission field that just applies to the breakfast not to the other two events on the form (dinner and Chanukah) 

  • aubreybourke
    Replied on October 18, 2017 at 11:20 AM

    Just a little confused here. Would you like there to be a $5 charge for breakfast and another $5 charge admission fee?


  • sstte18
    Replied on October 18, 2017 at 11:44 AM

    Nope. Just one $5 admission charge per person IF they want to pay it. It’s optional. 

  • aubreybourke
    Replied on October 18, 2017 at 12:37 PM

    So just to confirm the admission charge of $5 entitles them to breakfast? Sorry just trying to understand how the form is supposed to work.

  • sstte18
    Replied on October 18, 2017 at 12:47 PM

    This is how the question reads -


    Would you like to pay the OPTIONAL admission fee of $5/person to help defray costs and receive one free raffle ticket/person which will enter you to win a signed copy of Mike Silver's book ?


    That should answer your question

  • aubreybourke
    Replied on October 18, 2017 at 1:10 PM

    I added this show/hide condition so that you can still get a payment even if the optional No value is selected:

    1508346579Microsoft Edge 18 10 2017 18 0 Screenshot 10

    Form: https://form.jotform.com/72904737311960

     

     

  • sstte18
    Replied on October 18, 2017 at 2:11 PM

    The problem w your logic is that if someone isn’t coming to the breakfast (ie that field is empty) then the yes/no $5 question wouldn’t even show up. 

    Also as soon as they say no to that question AND if they are rsvping to more than one event the totals disappear for the other events which isn’t good  that yes/no question ONLY applies to the breakfast NOT to the other fields/events  

    Also I don’t really want the total cc or check for breakfast fields to be grayed out. Our members will be confused by that. I want those fields to NOT show at all IF the person says no the $5 question. 


  • Chriistian Jotform Support
    Replied on October 18, 2017 at 3:50 PM

    I am currently investigating your form. Please give me some time to further investigate the issue. I will get back to you once I get a result.

  • sstte18
    Replied on October 18, 2017 at 4:08 PM

    ok.  I appreciate your response.

  • aubreybourke
    Replied on October 18, 2017 at 4:17 PM

    I couldn't keep track of all the conditions. So I deleted all of them and started over clean. I have it working here
    https://form.jotform.com/72906098911968

     

    But obviously you will need to setup the thank you page conditions again.

  • Chriistian Jotform Support
    Replied on October 18, 2017 at 4:22 PM

    Here is a sample cloned form that I have created that you can check: https://form.jotform.com/72906169263967.

    Basically, I implemented the following steps on your form to fix the show/hide of the field.

    1. Remove all conditions related to the field in question: "Your Check Total for Brotherhood Breakfast" and "Your Credit Card Total for Brotherhood Breakfast".

    15083573122017 10 19 0355 Screenshot 10

    For these conditions:

    15083575292017 10 19 0408 Screenshot 21

    15083575492017 10 19 0409 Screenshot 32

    You can just update the condition and deselect or remove the certain field on the condition without deleting the whole condition.

    15083576152017 10 19 0409 001 Screenshot 43

    2. Setup the Show/Hide condition for the fields.


    Your Check Total for Brotherhood Breakfast field condition:

    15083579342017 10 19 0415 Screenshot 54


    Your Credit Card Total for Brotherhood Breakfast field condition:

    15083580132017 10 19 0416 Screenshot 65


    Here is a sample output of the sample cloned form: https://form.jotform.com/72906169263967

     15083579152017 10 19 0417 Screenshot 76

    15083580622017 10 19 0417 001 Screenshot 87

  • sstte18
    Replied on October 18, 2017 at 5:22 PM

    haha - yeah a lot of conditions.  without really testing your form - we can't have the $5 field question up top.  It ONLY applies if someone is coming to the breakfast.  It does NOT apply to any other event on the form....

  • sstte18
    Replied on October 18, 2017 at 5:26 PM

    so - the link in the email notification is wrong but the link in your response above looks SO much better!!!  

    Question though - are you able to hide the TOTAL Check/CC fields IF the person responds to two events and one of the two is the breakfast AND the person selected NO to the $5 question?  B/c in this case, the only total that would apply would be to the ONE event that the person responded to.  The breakfast would be "free".

     

    And...how do I clone your form?

  • Mike
    Replied on October 18, 2017 at 9:22 PM

    Take a look at the next guide to find out how to clone a form:

    How to Clone an Existing Form from a URL

    I will send a message to Chriistian to see if he can follow up.

  • sstte18
    Replied on October 19, 2017 at 5:52 PM

    I still haven't heard back from Christian...

  • Mike
    Replied on October 22, 2017 at 10:10 AM

    I don’t love that solution. I would like that field not to show at all if the answer is “no”. It works when that’s the only event the person RSVPs to. It doesn’t work when the breakfast is the 2nd or 3rd event being rsvpd to. Do you have another solution?  If not, I’m better off dividing that one event out onto it’s own form, I think. Do you agree?

    I have gone through your form and conditions again, and I do agree with you that it is the best to move the breakfast option into a separate form. It would be much easier to implement and maintain.