Conditions Logic

  • Profile Image
    bostonjo
    Asked on July 23, 2011 at 02:41 PM

    I would like two fields to be hidden when the form loads and become visible only if a specific box is checked.  The logic should be if "mail item or certificate" is checked then the heading field with the "mail to address" field should be displayed.  I tried a couple of ways to do this with no luck.  I then tried something very simple - If donor name field = "John" then hide "mail to" field.  This didn't work either.  It appears non of the condition logic is working.

    Here's the link to the form I'm designing - http://form.jotform.com/bostonjo/12023331677

  • Profile Image
    abajan
    Answered on July 23, 2011 at 08:00 PM

    Hi bostonjo

    There is a known issue where heading fields are not affected by conditions. Our developers are working to rectify this but there is a workaround where free text (HTML) fields can be substituted for headings.

    Here's what to do:

    1. Load the form in question into the form builder, and delete the Mail to: ... heading field

    2. Click the Electronic Certificate field so that when you click Free Text (HTML) it will be inserted immediately below the Electronic Certificate field

    3. Type the same text that was in the "Mail to:" heading field

    4. Click the Edit HTML Source button in free text editor and change the paragraph tags to  level 3 heading tags

    5. Inject the following CSS:

    #id_15 {
    padding:0;
    width:650px;
    }
    #id_15 #cid_15 {
    margin:0 !important;
    background:#f5f5f5;
    border-bottom:1px solid #ccc;
    padding:12px;
    clear:both;
    }
    #text_15 h3 {
    margin-top:-3px;
    margin-bottom:-3px;
    margin-left:-2px;
    }


    Now to Hide the Field by Default

    If you want a field to be hidden by default, a Show condition must be attached to it because the Conditions Wizard assumes that if a Show condition is put on a field, the intention must have been to have it hidden by default and only shown if the said condition is met. So, it seems you were on the right track at first but got deceived by the inability of the Mail to: heading field to be hidden, due to the bug to which I earlier alluded. Setting this condition should now work.

    You stated that you would like two fields to be hidden when the form loads. Which one is the other you wish to be hidden?

    Looking forward to your response.


    ~ Wayne