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.

Category Post Fields Options - sub-categories

  1. snomo
    Member

    I built a form today using the "category" option in the Post Fields menu. What I'd like to do is extend this feature to operate just as it does now, self populating with my WP post categories, updating the dropdown with any changes made to categories etc, but with a heirarchy of three levels of category; category>sub-category>niche-category. I'd like to include the three levels as a selectable item in three menus on the form so that when a specific category is selected, the available sub categories change, then when a sub-category is selected, the available niche-categories change. I have over 600 niche categories, spread across 50 or so sub-categories, spread across 8-10 categories. Is this possible with Gravity forms?

    I have a feeling it too is a custom enhancement but surely someone's done this before. If this is a custom piece I want to figure out an efficient way to have this developed so that it will function with new releases as well with full compatibility. I need to know what tools are available to spell out what needs to be developed for full compatibility, and I am looking for direction to keep this simple, straightforward and interchangeable amongst themes. Also, if anyone has already implemented this solution, please advise.

    Posted 12 years ago on Wednesday October 19, 2011 | Permalink
  2. I'm also looking for this functionality.

    Posted 12 years ago on Saturday November 5, 2011 | Permalink
  3. sascha
    Member

    +1
    Also looking for this functionality. Has anyone succeeded in getting this to work?

    Posted 12 years ago on Monday November 28, 2011 | Permalink
  4. You would have to implement this using AJAX and dynamic drop downs.

    Here is a tutorial on how to dynamically populate a drop down:

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

    However that is only going to cover how to do so in a static situation. You'd have to write custom code using jQuery to then interact with and change the values based on a selection using AJAX.

    This is not something that we have written a tutorial for and would be a fairly complex customization and not as simple as just using a hook and setting the values because you'd have to use AJAX to update them without a page refresh taking place. You'd have to understand how to do this under normal conditions and than apply it using available hooks and jQuery.

    Posted 12 years ago on Monday November 28, 2011 | Permalink
  5. sascha
    Member

    Thanks Carl!
    No idea about AJAX at the moment, so I am fully depended on someone posting their solution here.

    Posted 12 years ago on Wednesday November 30, 2011 | Permalink
  6. I was able to get ajax populated drop downs by following the instructions that Carl posted, and then mirroring that with ajax. So populate the drop downs with ajax, and then also use the gforms_pre_render so that gravity forms will retain values through submission.

    Posted 12 years ago on Tuesday February 14, 2012 | Permalink
  7. @scott, I deleted your post which was a duplicate of this post:
    http://www.gravityhelp.com/forums/topic/showing-category-hierarchy-using-drop-down#post-69133

    Posted 11 years ago on Saturday August 4, 2012 | Permalink

This topic has been resolved and has been closed to new replies.