The field types included in a standard Drupal installation are:
- Boolean: This stores a zero/one value in the database, but could be displayed to users as any text (such as no/yes).
- Decimal: This stores a number with a specified number of decimals. The character used for the decimal point is configurable, and you may optionally add a prefix or suffix to the number – for example, "$."
- File: This stores file data to a node/entity (while the actual file is stored in the file structure and not the database). Settings for this field include accepted file types, the folder where the files should be stored, file size limitations, and a few more options. It is possible to store files without making them publicly accessible if you have entered a path to use for private files on the toolbar Configuration, File system.
- Float: This stores a float number, which is the most precise type of number used in Drupal. As with decimals, you may add a prefix and suffix to the field.
- Image: This stores metadata for an image (while the actual image file is stored in the file structure and not the database). Field settings are similar to those for files, but also include alternate and title text settings, as well as limitations for image sizes.
- Integer: This stores a lightweight integer. As with decimals, you may add a prefix and suffix to the field.
- List (integer/float/text): This stores number and text data for predefined lists. The field type is useful for creating select lists or check boxes.
- Long text: This can store a large amount of text in the database, and is normally used only when you want a text area input.
- Long text and summary: This saves text along with a summary in the database. This field type is used in a standard article. Field settings include the option to write a customized summary.
- Term reference: This stores a reference to a taxonomy term. See Chapter 7 for details.
- Text: This stores a shorter amount of text in the database, usually inputted via a single-line text field.
Figure 6.2: Different field types have different settings. The figure shows the settings for text fields.
TIP: Drupal modules may provide more fields and widgets for your site, making it possible to have fields customized for e-mail addresses, geodata, video, and much more.