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.

Get Check box fields from a database

  1. Allenc
    Member

    Is there a way using this form set to automatically get something like meeting dates and display them as check boxes?

    I can do about 90% of what I want so far but haven't seen this option available but could just be over looking it.

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink
  2. You can do this as a customization using the gform_pre_render hook.

    http://www.gravityhelp.com/documentation/page/Gform_pre_render

    You would add some code to your functions.php using that hook to populate a set of check boxes with values pulled from your database.

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink
  3. Allenc
    Member

    Fantastic Thank you

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink
  4. Glad that helped. Please let us know if you need any help implementing it.

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink
  5. Allenc
    Member

    Im not seeing what I would title the pre render for checkboxes.. ie to change a drop down it is "populate_dropdown" wouls it be "populate_chckbox"?

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink
  6. That is the function name, you'd call it whatever you want. That example uses populate_dropdown because the function in that example is called populate_dropdown.

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink
  7. Allenc
    Member

    and that becomes the parameter I use in the dynamic field in the admin area?

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink
  8. I suggest you read over this post... it discusses how to populate a checkbox field dynamically:

    http://www.gravityhelp.com/forums/topic/dynamic-checkboxes

    Checkbox fields are actually one of the most complex fields to work with in Gravity Forms, primarily because they aren't really one field. Each checkbox is an individual field and the Checkbox field can consist of multiple checkboxes. So it's more complex than most.

    Posted 12 years ago on Tuesday August 23, 2011 | Permalink