• 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/

Viewing 2 replies - 1 through 2 (of 2 total)
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.