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.

Setting category via custom dropdown fields

  1. erk
    Member

    Hi,
    I am aware that "category field" can't be used with Conditional Logic".
    Until you add this feature I will use standard dropdown fields with manualy added categories and subcategories.
    There are way too many subcategories in my blog so to allow easy access I had to separate subcategories into different dropdown fields.
    Now It's possible to guide visitors into subcategories as I used conditional logic to hide unwanted.
    Here's my form
    Although I already dig into the forum for hours I can't find a way to populate the post category field according to data I collected with my dropdown fields.
    I hope to get a quick reply.
    Thanks in advance!

    Posted 13 years ago on Wednesday February 23, 2011 | Permalink
  2. This can't be done with the available options in the form editor.

    It can only be done via custom code and interacting with Gravity Forms via the use of hooks and filters.

    How familiar are you with PHP and WordPress hook/filter usage?

    Posted 13 years ago on Wednesday February 23, 2011 | Permalink
  3. erk
    Member

    Thanks Carl,
    I know a little but not an expert.I mean I know the basics of php and WordPress hook/filter usage but never used them for complex coding.

    Posted 13 years ago on Wednesday February 23, 2011 | Permalink
  4. Hi Erk,

    Here is a snippet that will let you populate any WP category as a dropdown (included categories).

    http://www.gravityhelp.com/forums/topic/custom-posts-and-custom-taxonomies#post-18613

    I've linked to the updated version, but if you scroll up in the thread you will see my original setup instructions. Let me know if you have any questions.

    Posted 13 years ago on Wednesday February 23, 2011 | Permalink
  5. erk
    Member

    @ David, This looks awesome! Thank you.

    Posted 13 years ago on Wednesday February 23, 2011 | Permalink