Conditional Logic: If-Elseif Structure

  • Profile Image
    pittsgb
    Asked on December 23, 2013 at 01:53 AM

    Hi, I'm trying to set up an if-elseif structure using the conditional logic. Here is an example form of what I am trying to do: http://form.jotform.co/form/33561607186861 . It's a radio button with three options and depending on which option you click, different text appears on the screen. For example, if you click "One and Three," then the text saying "This is one" should come up as well as the text "This is three." The text "This is two" should not come up. When no option is selected, no text comes up. 

     

    When I do this, it seems like only the first condition works. If it fails the first condition, it doesn't look like it's moving to the second condition and so on. In programming, this would be an if statement with multiple elseifs.

     

    Please let me know if this needs clarification! Thanks!

  • Profile Image
    jedcadorna
    Answered on December 23, 2013 at 06:14 AM

    @pittsgb,

    Thank you for contacting us. Please see this form if this works for you http://form.jotformpro.com/form/33562806450958 this is not an else if condition but the function works like what you mention in your example. 

  • Profile Image
    jedcadorna
    Answered on December 23, 2013 at 06:32 AM

    Hello, 

    Please see this another sample. This got same result as the first one but I used the OR IF condition rule http://form.jotformpro.com/form/33562632832959. The only difference with the first one is I have to pre select an option because all of the selection will display if there is no selected option.

    Let us know if you have other questions. If you question is not related to the original thread you can create a new thread here http://www.jotform.com/contact.