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.

Add more meta to image field

  1. I have form with an IMAGE post field, and I have "title" and "description" checked off under the meta information. I'd also like to add two additional fields for each image post field -- medium and price. My form has multiple image fields, so I don't want to have a separate field for each of these values, but would rather attach/group them with the image meta. Can you point me to where I can customize the meta options available for post images? Thanks

    Posted 12 years ago on Monday January 2, 2012 | Permalink
  2. Sounds like you will be extending the _wp_attachment_metadata entry in the wp_postmeta table. This sounds like a complex customization. Do you have any examples of how to do this with WordPress? If you do, I think we can figure out how to capture that information in a form. I believe we will have to use additional fields, then update the post using the gform_after_submission (for the attachment) after the form is submitted.

    Posted 12 years ago on Tuesday January 3, 2012 | Permalink
  3. Thanks Chris, actually, we're not using the form to create a post -- we only used the post image field because a) it had the title/description/caption fields (which we also needed) and we wanted it to auto-create the thumbnails. So we don't actually need the data in the addl fields to be attached to the image field at the end of the process - just trying to get it to show up there upon data entry. But if there isn't an easy way to add more meta fields, maybe i can just add additional medium/price fields under each image entry. thx!

    Posted 12 years ago on Tuesday January 3, 2012 | Permalink
  4. I don't believe there is an easy way to extend the _wp_attachment_metadata, so I think your best bet is to add some additional fields to capture the medium and price. You can use CSS to style and position them the way you want, so it appears seamless to the visitor.

    Posted 12 years ago on Wednesday January 4, 2012 | Permalink