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.

Populate dynamically from previous unselected check boxes?

  1. John
    Member

    How could I do this?
    Page 1 of form has a Checkbox with 5 choices (A, B, C, D, E)

    I want page 2 of form to have a dynamically populated checkbox from the unselected items from page 1.
    So if they selected A & B on page 1 they will have C, D, E available on page 2.
    If they selected C on page 1 they will have A, B, D, E available on page 2.

    Possible? Need more info?

    Thanks,
    John

    Posted 11 years ago on Thursday January 3, 2013 | Permalink
  2. Conditional logic is applied to one complete field, so you can't hide just some check boxes of one check box field based on choices made in a previous check box. You could hide a complete field, something like "If A was selected on page 1, don't show this field". But that means on page two you would have five fields, not one field of 5 possible checkboxes.

    Can you explain your application? Maybe we can come up with some other ideas. Thank you.

    Posted 11 years ago on Thursday January 3, 2013 | Permalink
  3. John
    Member

    Thanks for your thoughts. Yes there would be too many variables to create conditional logic for each checkbox option(s).

    What about populating a checkbox dynamically? I've never used that feature.

    More explanation: A person will be able to select only 5 choices(checkboxes) total on a 2 page form.
    On page 1 they will be given 5 choices then asked to proceed to next page(called a room).
    After they go to page 2 we don't want them to be able to unselect an item from Page 1, they are stuck with what they selected on Page 1 but we want to give them the option to add something from page 1 if they don't like the choices on page 2.

    Here is a jpg:
    http://highwaters.net/files/select.jpg

    On page 2 there is a radio button to asking them How to Proceed. If they want to go back to Page 1 we want them to be able to select from an unselected check box but not uncheck anything.

    John

    Posted 11 years ago on Thursday January 3, 2013 | Permalink
  4. John
    Member

    Can anyone think of a way I could have a checkbox group that would NOT allow someone to uncheck a box after they have gone to page 2 of the form?

    Once they are on page 2 I want to give them the option to select something from page 1 but not be able to change their previous selections.

    Thanks,

    Posted 11 years ago on Wednesday January 30, 2013 | Permalink
  5. John
    Member

    I wonder if this could work with GF checkboxes? ...if the checkbox is checked, stop unchecked...

    http://stackoverflow.com/questions/6424485/jquery-if-the-checkbox-is-checked-stop-unchecked

    <input type="checkbox" disabled="disabled" />
    If you want to disable a checkbox when it is clicked, with jQuery, you can do this:
    $("input[type=checkbox]").click(function() {
    $(this).attr("disabled", true);
    });

    Would the above be possible? How could I incorporate this jquery with GF?

    Posted 11 years ago on Thursday January 31, 2013 | Permalink
  6. You can add that jQuery to an HTML field in your form, or you can add it to the header section of the page where the form is displayed. You will need to do a little more to make that work in WordPress and to target your specific fields, but that should work.

    Posted 11 years ago on Saturday February 2, 2013 | Permalink