Search code examples
drupalwidgetfieldcontent-type

add custom field to image widgert in Drupal


I have a content type within which i'm using the Image field type and widget which provides a field for alt text and title. Now I'd like to add another field "link" to each image where I can define a custom link with each image. How can I do this?

Oh, I'm using Drupal 7...

Thanks, Ron


Solution

  • If you want to avoid having to build your own module, I suggest you try Field Collection module. The module allows you to create a set of fields, combine it into one field and then use it as a field on content type.

    You can create a field collection with one image field and link field, then output that as an image with link.