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.

Insert custom taxonomy value

  1. kbiglione
    Member

    I've created a form for submitting content to a custom post type. The function below uses the gform_post_data hook to insert the submission and everything works great.

    My problem: I'd like the user to also specify a custom taxonomy term. It's a hierarchical taxonomy structure, like categories.

    I've hacked the Gravity Forms core (yes, I realize this is a bad idea) to display the appropriate category names in the category select list. Unfortunately, those values aren't being recorded.

    What am I missing? Is there another line I need to add to specify the custom taxonomy name?

    function omw_update_post_type($post_data, $form){
    if($form["id"] == '1'){
    $post_data["post_type"] = "rfp";
    }
    return $post_data;
    }

    add_filter("gform_post_data", "omw_update_post_type", 10, 2);

    Posted 14 years ago on Wednesday August 11, 2010 | Permalink
  2. kbiglione
    Member

    Bump.

    In another thread Carl mentions that Custom Post Types and Custom Taxonomy are possible w/hooks. Any pointers to examples or documentation would be a big help.

    http://forum.gravityhelp.com/topic/wp-30-custom-post-types-custom-post-type-taxonomies

    Posted 14 years ago on Monday August 30, 2010 | Permalink