Title: [Plugin: Gravity Forms   Custom Post Types] Custom Post Type Relationships
Last modified: August 20, 2016

---

# [Plugin: Gravity Forms Custom Post Types] Custom Post Type Relationships

 *  [theslink2000](https://wordpress.org/support/users/theslink2000/)
 * (@theslink2000)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-custom-post-types-custom-post-type-relationships/)
 * Hi,
 * I’ve been pointed to you by the makers of wp-types and views plugin. I’ve been
   using you fantastic plugin to link my custom post types with Gravity Forms but
   I can find no way of implementing the post relationships that Types offers. The
   nearest I’ve been able to find, though not yet get working is this:
 * I figured it out. I only had to add the code below:
 * >  add_action(“gform_after_submission_1”, “update_review_data”, 10, 2);
   >  function
   > update_review_data($entry){ update_post_meta($entry[“post_id”], “_wpcf_belongs_item_id”,
   > $entry[1]); }
   > When gform_after_submission_1 is submitted, update_review_data sets _wpcf_belongs_item_id
   > equal to $entry[1] (field 1) for $entry[“post_id”] (the parent item).
   > To get the parent ID, I created a hidden field (field 1) which I pre-populated
   > when the form loads with the $post->ID with the code below:
   > do_shortcode(“[gravityforms id=1 field_values=’ItemID={$post->ID}’ ajax=true]”);
 * From Types forums, but the developers have suggested posing the question to you
   about getting this supported properly through the plugin and they even said they
   would like to work with you on it.
 * Can you let me know if any of this is possible please.
 * [http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/](http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Joe Banks](https://wordpress.org/support/users/joenasagrc/)
 * (@joenasagrc)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-custom-post-types-custom-post-type-relationships/#post-2900132)
 * +1
 *  Thread Starter [theslink2000](https://wordpress.org/support/users/theslink2000/)
 * (@theslink2000)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-custom-post-types-custom-post-type-relationships/#post-2900181)
 * Glad you agree Joe, let’s hope we hear from the dev’s eh?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Gravity Forms Custom Post Types] Custom Post Type Relationships’
is closed to new replies.

 * ![](https://ps.w.org/gravity-forms-custom-post-types/assets/icon-256x256.png?
   rev=2542252)
 * [Gravity Forms + Custom Post Types](https://wordpress.org/plugins/gravity-forms-custom-post-types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-custom-post-types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-custom-post-types/reviews/)

## Tags

 * [relationships](https://wordpress.org/support/topic-tag/relationships/)

 * 2 replies
 * 2 participants
 * Last reply from: [theslink2000](https://wordpress.org/support/users/theslink2000/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-custom-post-types-custom-post-type-relationships/#post-2900181)
 * Status: not resolved