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.

1.6.4.1.1 Bug - Existing Custom Fields not being recognized

  1. BryanWatson
    Member

    Hi,

    I'm trying to integrate Gravity Forms with some custom fields created by the Types plugin. I've been following along with Yoast's tutorial, and it worked fine previous to the 1.6.4.1.1 update.

    Yoast tutorial here: http://yoast.com/gravity-forms-custom-post-types/
    Types plugin here: http://wp-types.com/

    In GF 1.6.3 the integration worked fine and the custom fields created in Types showed in the 'Existing custom field' dropdown menu. http://o7.no/KI0O1X

    After updating to 1.6.4.1.1, It does not recognize any of the custom fields created by Types, but they are successfully registered and showing on the all post types pages. http://o7.no/IUbeO8

    I've setup a separate install to try to isolate the issue, but with no luck, leading me to believe it's a bug in 1.6.4.1.1

    Any insight would be great, even if people are encountering the same bug.
    -Bryan

    Posted 7 years ago on Monday May 7, 2012 | Permalink
  2. This is not a bug and the functionality is working as expected.

    The "Existing Custom Fields" drop down you are referring to returns the custom field names of existing post meta.

    A custom field name does not exist until there is post meta in the post meta database table using that custom field name.

    This drop down also only returns non-hidden custom fields. Custom fields stored with a custom field name that begins with an underscore (ex. _MyName) will not be displayed because an underscore denotes a hidden custom fields typically used for settings data, etc.

    The Types plugin is a 3rd party plugin. It's not default WordPress functionality and not something Gravity Forms interacts with in anyway. Simply by creating custom fields using the Types plugin does not mean data for those custom fields exist in the post meta table yet.

    Until you actually start creating posts that make use of those custom fields, Gravity Forms does not know they exist because Gravity Forms is querying the post meta table and returning ALL unique custom field names that have been stored. That is the only way it can return a list of existing custom field names.

    I went ahead and created a Test Post on the site you sent the login for. I created it as a Draft and input information in the custom fields that you had created using the Types plugin. After creating and saving that Test Post, those custom fields now appear in the "Existing Custom Fields" drop down in Gravity Forms.

    See this screenshot:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202012-05-07%20at%202.35.01%20PM.png

    That screenshot was taken directly from the test site you provided a login to after I added a Post and filled in those custom fields so that data existed for those custom fields in the post meta database table.

    So to clarify, the "Existing Custom Fields" drop down is listing existing data that you can select from. Until the data exists, there is no existing custom fields.

    In situations where a hidden custom field name is being used as I described above, you simply click the "New" radio button and type in the custom field name. Selecting a custom field name is unnecessary because you can always define it regardless.

    Posted 7 years ago on Monday May 7, 2012 | Permalink

This topic has been resolved and has been closed to new replies.