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.

Need help modifying the saved value of a custom taxonomy

  1. I'm using the Gravity Forms + Custom Post Types plugin to allow users to create a custom post type from the front end of my website. This CPT has a 'priority' custom taxonomy associated with it. I followed the plugin's instructions to set up the form to create CPTs with the priority taxonomy. The form is being saved but there is a problem - Gravity Forms is saving the term IDs instead of the term name.

    In the Gravity Forms entries screen I see that it is saving the priority as '10', '12', 17' (the term IDs) instead of 'low', 'medium', 'high' (the term names).

    I figure this is a limitation of the plugin and that I should be able to modify the value that gets saved to the database with some custom code (if value is 10, change it to 'low' and so on). However I don't know how to make use of Gravity Forms' actions and filters. Could someone please share an example of how to modify the saved value for my custom taxonomy? Thanks

    Posted 12 years ago on Thursday December 29, 2011 | Permalink
  2. kyle
    Member

    Not positive, but you can probably use the gform_admin_pre _render hook to accomplish that.

    Posted 12 years ago on Thursday December 29, 2011 | Permalink
  3. The term ID's may be saved by Gravity Forms because when it then creates a post, it adds those terms to the post that is created. Is that not what is happening? If not it could be an issue with the Gravity Forms Custom Post Types Add-On, which is a 3rd party add-on. Although it should support custom taxonomy.

    Posted 12 years ago on Thursday December 29, 2011 | Permalink
  4. Thanks Kyle, I'll give that a shot.

    Carl, the terms are being saved in Gravity Forms but not in the CPT. But Gravity Forms is saving the term ID, so the resulting CPT doesn't have have any priority terms applied to it. I.e. the terms are being saved in Gravity Forms as IDs but the CPT is created with no terms. Hope that makes sense..

    Posted 12 years ago on Friday December 30, 2011 | Permalink
  5. This sounds like an issue with the CPT Add-On itself. I'm not familiar with it other than what it is supposed to do as it's not an Add-On we created. You may need to discuss this with the developer of the Custom Post Types Add-On. I believe there is a support forum for this plugin on WordPress.org itself linked from the plugin page for that plugin.

    Posted 12 years ago on Friday December 30, 2011 | Permalink
  6. Thanks Carl, I had suspected as much.

    Btw, Happy New Year to you guys at RocketGenius :)

    Posted 12 years ago on Friday December 30, 2011 | Permalink
  7. Thank you. Please let us know what it turns out to be.

    Posted 12 years ago on Friday December 30, 2011 | Permalink
  8. GZA
    Member

    Hmmm, so today I have learned that if I want users to submit posts to specific custom post types (and associated custom taxonomies) I have to install a 3rd party plugin to achieve this. Is this correct?

    And, from what I've also learned today, the 3rd party plugin namely the Custom Post Types Add-on, is causing problems and conflicts with Gravity Forms. Great!

    @Carl do you have any firm plans for GF to support custom post types and taxonomies out of the box?

    Posted 12 years ago on Wednesday February 29, 2012 | Permalink