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.

Include Unchecked Checkboxes in Entry Data

  1. I have a multi-page form questionnaire that has a number of checkboxes for users to select optional product features. I've looked at the $_POST data that is submitted and I found that only checked checkboxes show up as input fields in $_POST and therefore are stored in the entry. What I'm wondering is there anyway that I can access the $_POST data before a lead or entry is created and run a check for the checkbox inputs and if they don't exist add them with a default value to the $_POST data?

    The reason I want to do this is so that the entry contains a Yes or No for the checkbox fields, which I can then use in the notification email.

    Thanks,

    Tim

    Posted 6 years ago on Friday August 24, 2012 | Permalink
  2. To access the $_POST values before the entry is created, you can use the gform_pre_submission hook: http://www.gravityhelp.com/documentation/page/Gform_pre_submission

    Posted 6 years ago on Sunday August 26, 2012 | Permalink