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.

Dynamic checkboxes: Not all selections being saved

  1. martyspellerberg
    Member

    Hi there, I'm having the same issue as described in this thread:

    http://www.gravityhelp.com/forums/topic/not-all-the-selected-values-from-checkboxes-are-being-saved-to-the-database

    Here's the code I'm using:

    http://pastie.org/6073683

    Posted 11 years ago on Tuesday February 5, 2013 | Permalink
  2. Had this same issue... I was able to solve it in my situation using a bit of a workaround.

    In my case, I had 52 possible choices (50 states, DC and "All") and each user can have a subset of those enabled depending on their subscription level.

    I was trying to have a blank (1 'disposable' item) checkbox list that I added items to... which failed... it may have worked with the pre_submission hook (I was just using pre-render).

    So in my case, I added all possible options (in bulk using the admin), and use code to remove ones that don't apply (essentially looping through the options/inputs and unsetting the non applicable ones). Since the removed ones look unchecked to GF, the form works!

    Won't work for everyone, but I'd imagine having a large set of disposable checkbox options (essentially blank 'slots' that you overwrite could work?

    Posted 11 years ago on Wednesday April 10, 2013 | Permalink