WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms + Custom Post Types
Custom fields not showing in form (14 posts)

  1. David Jay
    Member
    Posted 2 years ago #

    If I add a Custom Post Field Module to my form and select Existing under Custom Field Name no custom fields show up. I know the custom fields exist because they show if I open the CPT in the editor.

    I can populate a field with taxonomies so they are working.

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

  2. David Jay
    Member
    Posted 2 years ago #

    I figured this out. Not sure exactly what made it work. I may have been a little confused with the description on this post by Yoast that said you don't have to prefix the custom field name with "wpcf" if you are using a custom field group.

    My fields are included in a custom field group but I still need to prefix them with "wpcf". Even though my custom fields already existed (created in Types) I had to add them as "New" when creating the form.

    I also updated to Gravity Forms v1.6.3.

  3. bsains
    Member
    Posted 1 year ago #

    Just in case anyone comes across the same issue...

    Using -

    WP 3.3.2
    WP-Types - Version 1.0.1
    WP-View - Version 1.0.1
    Gravity Forms - Version 1.6.4.5
    Gravity Forms + Custom Post Types - Version 3.0.1

    It appears you need to have a single post created (saved as a draft is fine) against the custom post type before the custom post type fields will appear in Existing select field for the 'Custom Field Name'.

    Obviously a bug somewhere along the line... some what annoying, but I can live with it considering the power obtained by utilising these plugins.

  4. brianh04
    Member
    Posted 1 year ago #

    i am having this same problem, and neither solution worked for me. i really really really need this working, any help or suggestions will be greatly appreciated.

    WP 3.4.1
    Gravity Forms 1.6.5.1
    Gravity Forms + Custom Post Types 3.0.1
    WP-Types 1.0.4
    WP-Views 1.1.1

  5. bradvin
    Member
    Plugin Author

    Posted 1 year ago #

    I know this sounds weird, but if the post type is new and the custom fields have not been used yet (e.g. there are no postmeta entries in the db), then they will not show in the dropdown. Try creating a draft post (of your custom post type) and make sure you use the custom fields. They should then show up in the gravity forms dropdown.

  6. brianh04
    Member
    Posted 1 year ago #

    Thanks for the quick reply bradvin. i tried that, and i actually created several new posts with those fields filled in. i even deleted all my custom fields in WP-Types, since they were created before i installed gravity forms, and then re-created them with new names and prefaced them with "wpcf", then added posts with the fields filled in.

  7. goodlab
    Member
    Posted 1 year ago #

    HI,
    I am having the same problem. I do have posts in my custom post types that have all fields filled in. Neither "existing" or "new" under custom field name work. Please HELP!!!

    Thanks!

  8. goodlab
    Member
    Posted 1 year ago #

    Hey-
    I think I found a bug and the reason that te custom field doesn't show up. It is wrapped in a div class"clear" which is set to display none. And the elements are also set to display none. When selecting "existing" or "new" neither trigger js properly to change the display. Or something like that

  9. goodlab
    Member
    Posted 1 year ago #

    I removed the div class="clear" and it works. Probably not the best solution but it worked.

  10. bradvin
    Member
    Plugin Author

    Posted 1 year ago #

    so you removed the class=clear in the actual form editor screen?

  11. goodlab
    Member
    Posted 1 year ago #

    Yes. Like I said. Not sure it is the best solution but it worked.

  12. ehong33234
    Member
    Posted 1 year ago #

    which PHP file did you edit the div class? thx...

  13. John Sundberg
    Member
    Posted 1 year ago #

    If you created custom metaboxes and the ID for those metaboxes begins with an underscore (to hide them from the custom fields in the post editor), then they won't show up in Gravity Forms either.

    I ran into this with a couple plugins I built and then later tried to link Gravity Forms + Custom Post Types to those post types. After removing the underscores in the plugins, page templates, and database everything worked as expected.

    Thanks for making a very helpful plugin, by the way!

  14. Pamela Looper
    Member
    Posted 1 year ago #

    Hi there, I hope @goodlab or @bradvin still see updates of this thread. Can you please advise in which file you removed the class="clear"? Not all my custom post type custom fields show up, but they have been used and work fine otherwise. Would love to populate them through Gravity forms. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic