Posted by scottrouse on February 3, 2011 at 5:27pm
Last updated by DarrellDuane on Sun, 2016-03-13 19:35
Last updated by DarrellDuane on Sun, 2016-03-13 19:35
opegasus noted that there wasn't a readily-available list of all the core (and contributed?) field types for Drupal 7. Let's make one.
What are they for? i.e. why chose one over the other? How come I have field types like term-reference that aren't listed here?
Core Field Types
Module | Label | machine-readable name | php type | Widget |
---|---|---|---|---|
File | File | file | file_generic | |
Image | Image | image | image_image | |
List | List (integer) | list_integer | options_select, options_buttons | |
List | List (float) | list_float | options_select, options_buttons | |
List | List (text) | list_text | options_select, options_buttons | |
List | Boolean | list_boolean | options_buttons, options_onoff | |
Number | Integer | number_integer | int | number |
Number | Decimal | number_decimal | numeric | number |
Number | Float | number_float | float | number |
Taxonomy | Taxonomy term reference | taxonomy_term_reference | options_select, option_buttons, taxonomy_autocomplete | |
Text | Text | text | text_textfield | |
Text | Long text | text_long | text_textarea | |
Text | Long text and summary | text_with_summary | text_textarea_with_summary |
The initial list above has been gathered from http://drupal.org/node/774742
Contributed Field Types
Name of Field Type | machine-readable name | Module link | Widgets |
---|---|---|---|
Address Field | addressfield | http://drupal.org/project/addressfield | addressfield_standard |
Coin Tools | http://drupal.org/project/cointools | ||
Date | date, datestamp, datetime | http://drupal.org/project/date | date_select, date_text |
Dimension | dimension | http://drupal.org/project/dimension | dimension |
Email Address | http://drupal.org/project/email | ||
Entity Reference | entityreference | http://drupal.org/project/entityreference | options_buttons, options_select, entityreference_autocomplete, entityreference_autocomplete_tags |
Link | link_field | http://drupal.org/project/link | link_field |
Location | location | http://drupal.org/project/location | location |
Media | http://drupal.org/project/media | ||
Paragraphs | paragraphs | http://drupal.org/project/paragraphs | |
Phone | phone | http://drupal.org/project/phone | phone |
Serial | http://drupal.org/project/serial | ||
Time | http://drupal.org/project/cck_time | ||
Workflow | http://drupal.org/project/workflow | sid |
See http://drupalcode.org/project/drupal.git/tree/dce3c77a61d9510dbac6927b60... for where core fields are defined. Look in each .module file.
isn't http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc... what your looking for?