Warning message

Documentation is currently being migrated into the new system. Some pages might be temporarily missing, and some guides might appear empty. Thank you for your patience while we are improving Drupal.org documentation.

Add a field to a content type

Last updated on
3 November 2016
  1. Navigate to the Content types page (Administer > Structure > Content types).
  2. In the table, locate the row that contains your content type and click the MANAGE FIELDS link. If you can't find the MANAGE FIELDS link, be sure to enable the Field UI module.
  3. In the Add new field section, enter a label for the field.
  4. In the Field name field, enter the machine name for the field. You can only use numbers, lower-case letters and the underscore character (_). Node that the machine name is automatically generated and it is not necessary that it be changed.
  5. In the field type list, select one of the following types. Note that more fields such as 'Date' and 'Location' can be added using Drupal modules. To find modules, click here. For help installing modules, click here.

    Text

    short text such as a name (limited to 255 characters)

    Long text

    long, multi-line alphanumeric text such as a biography

    Boolean

    has one of two values (for example: "yes/no" or "true/false" or "small/large")

    List (text)

    select from a list of text options (which can be formatted as either a drop-down list or checkboxes)

    File

    reference to a file (such as a PDF) on the Drupal file system

    Image

    reference to an image file such as GIF, JPG, PNG on the Drupal file system

    Term reference

    reference id to an existing Taxonomy Term (or tag)

    Integer

    a whole number, such as a year (e.g. 2012) or value (e.g. 1, 2, 5, 305); it does not allow decimals.

    Float

    a number that can use decimals, such as 0.0123456789

    Decimal

    a number that allows exact decimal values; often used for price or cost (such as $199.99)

    List (float)

    select from a drop-down list of floats

    List (integer)

    select from a drop-down list of integers

    Long text and summary

    same as long text, but with an additional summary text

  6. In the Widget field, select a widget. The options vary depending on the field type.
  7. Click Save.

Note: Not all field types are provided by Drupal core. Things like References, Dates, Links, and various other types can be found by filtering on "field" in the module list on drupal.org (or "Content Construction Kit" for Drupal 6). Users of the CCK module in Drupal 6 should note that the node reference and user reference fields are not supported in Drupal 7 core; however, there is a separate References module that provides support for these fields in Drupal 7. In Drupal 7 Entity reference is a good option to use for references because in Drupal 7 most of things in core are managed through entity.