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.

Dynamically build Select box

  1. I have a select box that holds some event date options. I also have a database holding those events. I'd like to hook into a specific select box to automagically populate the options with my dates. I looked at the content hooks, and saw some about checkboxes and radio buttons, but none for select boxes.

    I'm pretty comfortable with hooks and filters, I simply need to know which ones to use.

    In my form I've selected that it should allowed to be populates dynamically, and given it a parameter name.

    Posted 12 years ago on Tuesday January 10, 2012 | Permalink
  2. Any hope for this one?

    Posted 12 years ago on Friday January 13, 2012 | Permalink
  3. If you want to dynamically populate a drop down field there is a How To tutorial on how to do this in the How To section of the Documentation. You can find this specific How To here:

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

    Posted 12 years ago on Sunday January 15, 2012 | Permalink
  4. Carl - Thanks for sharing this article. Is there a reason why the filter gform_field_value_[input_value] filter doesn't work for dynamically populating drop downs?

    On a side note, I added one line and modified one line in the static function:

    get_select_choices($field, $value="")

    in the file:

    /gravityforms/common.php

    To enable dynamically populating drop downs using the traditional gform_field_value_[input_value] filter.

    My changes are marked with: //***** DC:

    See: http://www.pastie.org/3473370

    I still need to include support for evaluating the selected option.

    Thanks,

    David Carroll

    Posted 12 years ago on Monday February 27, 2012 | Permalink