- uclamusicstageAsked on July 17, 2015 at 06:54 PM
I'm trying to do some admittedly complex conditional statements. But in the preview, it's not responding the way it's supposed to, nor are they responding in the same way each time.
I have a form for reserving one of our theaters. If they are part of our department (one of the HASOM departments or the Monk Institute), and they need a piano, I want it to show the piano options in that theater, and hide the options in the other theater. But it's not working like it should.
I have a conditional IF "Do you need a piano" is empty, then HIDE "Please choose which piano (S)" and "Please choose which piano (P). Then another to say IF "Which Theater..." is equal to "Schoneberg Hall", AND "Which Best Describes..." is equal to "HASOM -- Music", AND "Do you need a piano is equal to "Yes" then to hide "Please choose which piano (P)" (NB, the "(P)" in that question stands for Popper Theater). I've duplicated those conditional statements and changed it to be the same for the other HASOM groups and the Monk Institute.
So when I choose "Schoenberg Hall", "HASOM -- Music" and "Yes" for Do you need a piano? the options for Schoenberg Hall (Gold, Ebony, Ivory) should appear, and the options for Jan Popper Theater (Steinway B... and Steinway C...) should not appear. But what happens is that options for both theaters appear.
BUT, if I change the answer for "What best describes your affiliation" to, say "HASOM -- Musicology", the options for "Which piano... (P)" disappear (like they should). If I change the answer back to "HASOM -- Music", those other options stay hidden. This pattern persists regardless of the specific choices -- I choose a theater, I choose one of the HASOM affiliations (including Monk), and Yes, for needing a piano, and the options for both theaters show up. But when I choose another affiliation, the options for the pianos in the other theater go away. If I return to that first affiliation, those other piano choices stay hidden.
That seems to indicate the conditionals are written correctly, but somehow, the app isn't quite reading them the way they should. Is it possible that I should change the order to fix that? It's was begining to drive me a bit nuts until I discovered this pattern. Can you offer any better insight?
- JotForm SupportEltonCrisAnswered on July 18, 2015 at 04:02 AM
There are few conflicts with your conditions and that's the reason why it is not performing correctly.
First, I would suggest to use "Show" on your action conditions. So when a field is on show condition, it is hidden by default when you load the form. It will only show once the condition is triggered.
Also, please keep in mind that conditions has its priorities. Conditions on the most top has higher priority than the conditions below. So if you have a field used on two different condition actions, it may cause conflict.
If "FieldA" is equal to "Yes", Show "Box1"
If "FieldB" is equal to "Yes", Show "Box1"
I have only recreated the conditions on "What best describes your affiliation?" field since I lose track with the rest because of the "hide" conditions used. If I know which fields to show per condition rules, it would be pretty easy.
If you need further help about this, do let u s know and we'd be happy to help you here.
- uclamusicstageAnswered on July 20, 2015 at 05:57 PM
Thanks for this! If I'm reading your response correctly, if I set up a condition to 'show' something, JotForm assumes it's hidden otherwise? I wasn't sure about that, so I was hiding things when the conditions weren't met, and that was making things complicated.
I appreciate your help with this.
- JotForm SupportEltonCrisAnswered on July 20, 2015 at 07:24 PM
No, that's not what it means.
When show condition is used, the field used in the action condition will be hidden until it is triggered.
If field1 is filled, show submit
So when you preview the form, the submit button is hidden until field1 is filled.
You can see it in action here: http://form.jotformpro.com/form/52007395022951?
Hope this clarifies a bit.