• Resolved Giellemme

    (@giellemme)


    Hi there,

    I’m using the plugin to create post entries from the front end. The custom post type is created with the Toolset plugin . Everything is working fine, but the CPT has a ‘relationship’ with another Custom Post Type which acts like a ‘parent’ post. To record this relationship Toolset stores the the parent post id in a custom field named _wpcf_ belongs_parent_id.

    Now, when I create the post with gravity form I need to add an hidden field posting the parent id and inserting it in the above mentioned custom field. But I cannot see the custom field name in the dropdown list. Does someone have any clue???

    Thanks

    https://wordpress.org/plugins/gravity-forms-custom-post-types/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am experiencing a simular issue:

    Both the Custom Post Type and Custom Fields have been created with the Types Plugin (part of the Toolset from On The Go Systems).

    The custom fields that have been created and have been assigned to the default Post type are being displayed in the select/drop-down list. However, custom fields that have beed assigned only to the custom post type are NOT being displayed. I’ll start looking into your code and see if I can trouble shoot this by forking it on GitHub.

    Update: my issue was not at all related. The issue is that the SQL select from gravity to populate this field is:

    SELECT meta_key
            FROM $wpdb->postmeta
            WHERE meta_key NOT LIKE '\_%'
            GROUP BY meta_key
            ORDER BY meta_id DESC"

    so if the meta_key was never saved to this table (with at least one value), then it will not appear in the list. My work around was to create a dummy post that saved something for all custom fields.

    Plugin Author Dave from Gravity Wiz

    (@spivurno)

    @giellemme, private post meta keys (any that start with an underscore) will not show up in the Gravity Forms custom field drop down. You can still manually type that meta key in though.

    @baden, see my answer to Giellemme. You don’t actually have to select it from the drop down. You can just type it out.

    Thread Starter Giellemme

    (@giellemme)

    Thank you David, Thank you Baden! I had figured that out by myself through trial-and-error old method! Glad to hear it was the right way, though!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot find Custom field name’ is closed to new replies.