How to Upload an Image With Drupal Form API

Drupal's built-in form API makes it easy to add image fields to content types, such as article and page templates. The image upload form is presented on the "Add Content" screen once the image field is configured for the content template. The form also allows you to add captions to the image once you upload it.

Instructions

    • 1

      Log in to your Drupal administrator account and click "Structure" on the dashboard.

    • 2

      Click on "Content Types." This brings up the presently configured content types. Click on the content type you want to add the image upload form to.

    • 3

      Click on "Manage Fields." Move down to "Add New Fields."

    • 4

      Name the field in the "Title" box. Since you're using it to upload images, consider naming it "Picture," "Photo" or "Image."

    • 5

      Select "Image" in the "Field" category, then select "Image" under "Form Element." Click on "Save."

    • 6

      Click on "Choose File" if you want to select a default image for the form. Click on "Save" to finish.

Related Searches:

Resources

Comments

Related Ads

Featured