PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Checkboxes not working with Conditional Logic

  1. jlcolema
    Member

    I'm currently using version 1.6.3 and having trouble figuring out how to get conditional logic to work with checkboxes.

    My example:

    A user fills out an address form. At the bottom of the form is a checkbox for "Same as Billing Address." If checked, the section below (for Shipping Address) should not display.

    While editing the form, I choose the Shipping Address section break, and enable Conditional Logic. Options for drop downs, input and radio buttons appear, but nothing for checkboxes. I did a few tests, and it seems that for any situation involving conditional logic, checkboxes do not appear as an option within the list.

    Posted 12 years ago on Sunday March 4, 2012 | Permalink
  2. Could you export your form and send the XML file to me at rob@rocketgenius.com

    Posted 12 years ago on Sunday March 4, 2012 | Permalink
  3. Hi,

    I ran into this same problem as well. I found the problem and corrected it.

    The problem is with IsConditionalLogicField() function in form_editor.js (line 1725):

    return jQuery.inArray(inputType, supported_fields);

    This is the incorrect use of the jQuery.inArray() function. The function returns a -1 if the item is not found in the array, or the index of the array item if it is found. Since "checkbox" is the first item in the list, the IsConditionalLogicField() function will always return 0 for checkbox fields, translating to false.

    The correct code should be:

    return jQuery.inArray(inputType, supported_fields) != -1;

    Hope this helps!

    - Sean

    Posted 12 years ago on Monday June 25, 2012 | Permalink