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.

Alphabetical Categories

  1. I've added a Post Category field to my form but it doesn't seem to order them alphabetical.

    How do I fix this?

    See - http://jbayjobs.co.za/load-cv

    Posted 13 years ago on Tuesday January 18, 2011 | Permalink
  2. From here by Carl Hancock:
    http://forum.gravityhelp.com/topic/sort-order-of-category-dropdown#post-8385

    Currently there is no way to change the sort order of the Category drop down.

    That was 5 months ago.

    Posted 13 years ago on Tuesday January 18, 2011 | Permalink
  3. mgannon37
    Member

    I am having the same issue....the sort order of the categories in a Post Category field is alphabetical (what I want) when building the form. But when using the form, the order is not. Is there a work around for this issue yet? It is key to my form. Post Category fields do not support conditional logic, so I am using a single large sub-category field to cover a number of different parent categories; alphabetical sort is essential.

    I'm willing to hack a core file or two, and then re-do the hack when ever I upgrade if need be.

    Thanks.

    Posted 12 years ago on Tuesday August 30, 2011 | Permalink
  4. The sort order should be alphabetical. If it is not on the front end, then it is a bug. We'll look into it.

    Posted 12 years ago on Wednesday August 31, 2011 | Permalink
  5. mgannon37
    Member

    Good to hear! I'm looking forward to what you find out.

    I may have done something inadvertently dumb that is messing it up, but if so, I sure can't figure out what it is.

    Posted 12 years ago on Wednesday August 31, 2011 | Permalink
  6. mgannon37
    Member

    I've solved my problem using the gform_post_submission action. The code is placed in my theme's functions.php file.

    Here's the code in case it might help someone else:
    http://www.pastie.org/2481756

    I used one main dropdown field (general condition) and eleven subcategory dropdowns with conditional logic.

    Since a post category is an array, appending the values of all subcategories to the end of the array works. If a subcategory was not selected, the value is null; so the append only catches the single subcategory that was selected.

    The filters/hooks part of Gravity Forms is very impressive....it really does allow for doing just about anything.

    Thanks for a great plugin!

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  7. I am having the same problem with disordered categories. It's baffling, because the categories aren't being sorted alphabetically or by category ID.

    Posted 12 years ago on Wednesday September 14, 2011 | Permalink
  8. What version of Gravity Forms are you using and do you have an example of this happening on a public form?

    Posted 12 years ago on Wednesday September 14, 2011 | Permalink
  9. I am using 1.5.2.8, and I don't have an example at the moment.

    Posted 12 years ago on Wednesday September 14, 2011 | Permalink
  10. @braindouche, we were not able to replicate this problem but we were able to add some extra protection to ensure the category drop down is sorted alphabetically. The fix will be included in the 1.6 release, or if you need it before the final release of 1.6, please send me an email at chris@rocketgenius.com and I will get the latest release candidate to you. Thank you.

    Posted 12 years ago on Tuesday November 1, 2011 | Permalink

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