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.

gform_field_choices filter suggestions

  1. Hello!

    While developing I hit a currently impassable block. The filter gform_field_choices currently returns $choices as a string. This is okay but limits what a developer can do.

    In my project I have a form that creates a post and attaches a category. Since there is no option to have categories only be EXCLUDED and only INCLUDED, my first thought was to use this filter to remove a few unwanted categories from this.

    Being that there are only a couple categories that I want to exclude and that there will be an ongoing list of categories to include, selecting the Selected Categories on the UI isn't an option.

    Either way, my suggestion is to have $choices submitted as an array instead of a string. Not only would that solve my own personal problem but would allow other developers to have full control of the output of the checkboxes.

    Thoughts

    Posted 10 years ago on Tuesday June 25, 2013 | Permalink