[title sub="Written by Chris Graham"]Composr Tutorial: Custom fields[/title]

When building catalogues, custom fields for inbuilt content types, and Custom Profile Fields, you have a unified set of fields to choose from.
This tutorial describes all the different fields and their options.

"Special default values" are taken from a special field option named [tt]default[/tt]. E.g. [tt]default=![/tt] for the [tt]email[/tt] fields's defaulting to the current member's e-mail address.
The special defaults apply only to add/edit forms, they don't populate automatically for hidden fields or update into existing records if a field is added after records already exist.

[b]A note about personal information and privacy:[/b]
Instead of using generic text or numeric fields, you should ideally use the respective field types when gathering member IDs, usernames, e-mail addresses, IP addresses, or passwords. And avoid attachment support where possible as well (use a file/picture/video upload field). That way, the privacy system can efficiently search for and handle personal data when purging or downloading it.

Additionally, it is your responsibility to enable the 'May contain personal information' on all fields where submitters may be including personal information. The privacy system will not handle fields which do not have this setting enabled unless explicitly mentioned for that field type in the list.

[contents]decimal,lower-alpha[/contents]

[title="2"]Text[/title]

[b]A note about sorting:[/b]
Note that text fields will sort using a text sort algorithm. For example, "10" comes before "3", because 1 is less than 3 and it compares characters left-to-right rather than as actual numbers. To get numeric sort you would need a number field type.

[title="3"]short_trans[/title]

{| 15em wide
! Type label
| A brief line of translatable/Comcode text
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (linked through translate table)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__short_trans.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__short_trans.png[/media]
|}

[title="3"]short_trans_multi[/title]

{| 15em wide
! Type label
| Multiple brief lines of translatable/Comcode text
|-
! Storage format (for programmer reference)
| Text separated by linebreaks (no character limit) (linked through translate table)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)

[tt]num_required[/tt] (the number of required values; default is 0 or 1 depending on if required is set)

[tt]cms_type=line|codename|integer|float|email[/tt] (which Composr styling and validation code to use; default is line)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__short_trans_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__short_trans_multi.png[/media]
|}

[title="3"]short_text[/title]

{| 15em wide
! Type label
| A brief line of text (no Comcode support)
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [tt]NAME[/tt]: Current member's display name
|-
! Supported field options
| [tt]maxlength[/tt] (the number of characters to have as a maximum; default is 255)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__short_text.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__short_text.png[/media]
|}

[title="3"]short_text_multi[/title]

{| 15em wide
! Type label
| Multiple brief lines of text (no Comcode support)
|-
! Storage format (for programmer reference)
| Text separated by linebreaks (no character limit)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)

[tt]num_required[/tt] (the number of required values; default is 0 or 1 depending on if required is set)

[tt]cms_type=line|codename|integer|float|email[/tt] (which Composr styling and validation code to use; default is line)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__short_text_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__short_text_multi.png[/media]
|}

[title="3"]long_trans[/title]

{| 15em wide
! Type label
| A paragraph(s) of translatable/Comcode text
|-
! Storage format (for programmer reference)
| Text (linked through translate table)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]wysiwyg=on|off[/tt] (whether to enable the WYSIWYG editor; default is on)

[tt]wordwrap=on|off[/tt] (whether to word-wrap lines in the editor, as opposed to horizontal scrolling; default is on)

[tt]input_size[/tt] (the number of lines in the text area; default is 9)

[tt]maxlength[/tt] (the number of characters to have as a maximum; default is to have no limit)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__long_trans.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__long_trans.png[/media]
|}

[title="3"]long_text[/title]

{| 15em wide
! Type label
| A paragraph(s) of text (no Comcode support)
|-
! Storage format (for programmer reference)
| Text
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]widget=text|huge[/tt] (widget type, huge is a full-width input and does not support the input_size option; default is text)

[tt]wordwrap=on|off[/tt] (whether to word-wrap lines in the editor, as opposed to horizontal scrolling; default is on)

[tt]input_size[/tt] (the number of lines in the text area; default is 9)

[tt]maxlength[/tt] (the number of characters to have as a maximum; default is to have no limit)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media description="Text widget" framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__long_text.png[/media]
[media description="Huge widget" framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__long_text__huge.png[/media]
|-
! Front-end UI
| [media description="Text widget" framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__long_text.png[/media]
[media description="Huge widget" framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__long_text__huge.png[/media]
|}

[title="3"]posting_field[/title]

Note that you are only allowed one [tt]posting_field[/tt] field per catalogue. Also, any fields which appear below the posting field will be collapsed in an 'Additional information' section. Ideally, a posting field should be towards the bottom of your list of fields with optional, trivial fields below it.

{| 15em wide
! Type label
| A paragraph(s) of Comcode, with attachment support
|-
! Storage format (for programmer reference)
| Text (linked through translate table)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__posting_field.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__posting_field.png[/media]
|}

[title="3"]codename[/title]

{| 15em wide
! Type label
| A codename (short sequence of numbers and letters, no spaces)
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [tt]RANDOM[/tt]: 10 random numbers and letters (for catalogues it will be enforced as unique also) [catalogues only]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| An entry will be rejected if this field contains characters other than letters, numbers, and underscores.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| When adding there is no UI if 'RANDOM' was used.
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__codename.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__codename.png[/media]
|}

[title="3"]password[/title]

{| 15em wide
! Type label
| A password (i.e. masked input)
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [tt]RANDOM[/tt]: A cryptographically-secure random password will be generated as the placeholder which matches the security requirements configured for the site
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i]. Be cautious because this does not validate against password strength.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests. Ignores the 'May contain personal information' setting as passwords are always sensitive.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__password.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__password.png[/media]
|}

[title="3"]email[/title]

{| 15em wide
! Type label
| An e-mail address
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (e-mail address, or blank)
|-
! Special default values
| [tt]![/tt]: Current member's configured e-mail address
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected of the value is not formatted as a valid e-mail address.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]E-mail address[/tt] criteria for anonymising if 'May contain personal information' is ticked/checked. [i]Highly recommended for all e-mail address fields where personal e-mail addresses may be stored.[/i]
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__email.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__email.png[/media]
|}

[title="3"]ip_address[/title]

{| 15em wide
! Type label
| An IP address
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (IP address, or blank)
|-
! Special default values
| [tt]![/tt]: Current member's IP address
|-
! Supported field options
| [tt]allow_wildcards=yes|no[/tt]: whether wildcards are allowed in provided IP addresses (default is no)
|-
! Special field validation behaviour
| The entry will be rejected if the value is not a valid IPv4 or IPv6 address.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]IP address[/tt] criteria for anonymising if 'May contain personal information' is ticked/checked. [i]Highly recommended for all IP address fields which could contain IP addresses belonging to visitors.[/i]
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__ip_address.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__ip_address.png[/media]
|}

[title="3"]ip_address_multi[/title]

{| 15em wide
! Type label
| Multiple IP addresses
|-
! Storage format (for programmer reference)
| Text separated by linebreaks (no character limit)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]allow_wildcards=yes|no[/tt]: whether wildcards are allowed in provided IP addresses (default is no)
|-
! Special field validation behaviour
| Values which are invalid IPv4 or IPv6 addresses will be automatically removed.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]IP address[/tt] criteria for anonymising if 'May contain personal information' is ticked/checked. [i]Highly recommended for all IP address fields which could contain IP addresses belonging to visitors.[/i]
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__ip_address_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__ip_address_multi.png[/media]
|}

[title="2"]Numbers[/title]

[title="3"]integer[/title]

{| 15em wide
! Type label
| An integer (whole number, e.g. 5)
|-
! Storage format (for programmer reference)
| Integer, or null
|-
! Special default values
| [tt]AUTO_INCREMENT[/tt]: An automatically assigned sequential number [catalogues only]
|-
! Supported field options
| [tt]range_search=on|off[/tt]: search forms will allow a range-based search
|-
! Special field validation behaviour
| The entry will be rejected if this is not a valid integer.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__integer.png[/media]
NB: When adding there is no UI if 'AUTO_INCREMENT' was used.
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__integer.png[/media]
|}

[title="3"]float[/title]

{| 15em wide
! Type label
| A float (decimal number, e.g. 3.2)
|-
! Storage format (for programmer reference)
| Floating point number, or null
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]range_search=on|off[/tt]: search forms will allow a range-based search

[tt]decimal_points=2[/tt]: the (maximum) number of decimal points we want

[tt]decimal_points_behaviour=dp|trim|price[/tt]: dp = always show exact number of decimal places (default), trim = trim any zero decimal places off, price = show exact number of decimal places or none if a whole number
|-
! Special field validation behaviour
| The entry will be rejected if this is not a valid number.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__float.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__float.png[/media]
|}

[title="2"]Choices[/title]

[title="3"]list[/title]

{| 15em wide
! Type label
| A value chosen from a list
|-
! Storage format (for programmer reference)
| Selected/input text (programmer note: no character limit, so we can support very long list items)
|-
! Special default values
| Options to include in the list, delimited by "|" (e.g. "This|That|Other"). You can also do like "a=This|b=That|c=Other" if you need the saved values to be different from the values displayed for selection, and optionally also displayed on the site. This is called "key-val format".

[i]Or:[/i]
[tt]CURRENCY[/tt] -- input a currency (input uses the ISO code, display uses the ISO code)

[i]Or:[/i]
A pathname to a [tt].csv[/tt] spreadsheet file (relative to base directory), if the non-bundled Nested CPF Spreadsheet Lists addon is installed.
|-
! Supported field options
| [tt]custom_values=on|off[/tt] (whether to allow a custom typed value; if enabled then inline list widgets will not be available; default is off)

[tt]dynamic_choices[/tt] (whether to feed custom values back in as possible selections for others; default is off)

[tt]display_val=on|off[/tt] (when key-val format is used this sets whether it also influences display not just input)

[tt]value_remap=none|country[/tt] (if set to country then the full country names are shown for ISO country codes in the list options; default is none)

[tt]auto_sort=on|off[/tt] (whether to sort the list options; default is off)

[tt]input_size[/tt] (the number of options shown in the list before scrolling is required, applies only to the 'inline' widget type; default is 9)

[tt]widget=radio|inline|dropdown|inline_huge|dropdown_huge[/tt] (the UI mechanism; default is dropdown)

[tt]spreadsheet_heading[/tt] (the column from the spreadsheet file to use, if the default was set as a spreadsheet file; default is to use the first column)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list__dropdown.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list__inline.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list__inline_huge.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list__radio.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list__dropdown.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list__inline.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list__inline_huge.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list__radio.png[/media]
|}

[title="3"]list_multi[/title]

{| 15em wide
! Type label
| Multiple values chosen from a list
|-
! Storage format (for programmer reference)
| Selected/input text separated by linebreaks
|-
! Special default values
| [i](See [tt]list[/tt])[/i]
|-
! Supported field options
| [tt]auto_sort=off|frontend|backend|both[/tt] (choose front-end to sort the selected choices, choose back-end to sort the list options, choose both to sort both; default is off)

[tt]show_unset_values=on|off[/tt] (whether to show non-set list options on the front-end with a cross next to them; default is off)

[tt]custom_values=off|single|multiple[/tt] (whether to allow a custom typed value; default is off)

[tt]dynamic_choices[/tt] (whether to feed custom values back in as possible selections for others; default is off)

[tt]widget=vertical_checkboxes|horizontal_checkboxes|multilist[/tt] (what input style to use; default is multilist)

[tt]input_size[/tt] (the number of options shown in the list before scrolling is required, applies only to the 'inline' widget type; default is 5)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list_multi.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list_multi__horizontal_checkboxes.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list_multi__vertical_checkboxes.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__list_multi__multilist.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list_multi.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list_multi__horizontal_checkboxes.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list_multi__vertical_checkboxes.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__list_multi__multilist.png[/media]
|}

[title="3"]state[/title]

This field requires input of a raw ISO code. Ideally, you should use the 'region' field type instead as it is more intuitive for users.

{| 15em wide
! Title
| A state within a country
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| If using American English, will ensure the typed ISO code is a valid U.S. state. Otherwise, it will ensure it is a valid region ISO code.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__state.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__state.png[/media]
|}

[title="3"]country[/title]

{| 15em wide
! Title
| A country
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__country.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__country.png[/media]
|}

[title="3"]region[/title]

A 'region' is a way to define a country and province/state. The field has two dropdowns, one for country and one for region. When a country is selected, the region dropdown will be populated (via AJAX / JavaScript) with its regions.

{| 15em wide
! Title
| A region
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (stores the ISO code of the country/region)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__region.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__region.png[/media]
|}

[title="3"]tick[/title]

{| 15em wide
! Type label
| Checkbox ('Yes' or 'No')
|-
! Storage format (for programmer reference)
| Integer (0 or 1)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will be unticked (unchecked) if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600" description="If set as required it will not actually show as required as it is not possible for it to not have a value"]data_custom/images/docs/tut_fields/core_fields_backend__tick__required.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600" description="If set as non-required it will actually be a drop-down input with 3 possible values (N/A, No, Yes)"]data_custom/images/docs/tut_fields/core_fields_backend__tick__not_required.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__tick__required.png[/media]
[media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__tick__not_required.png[/media]
|}

[title="2"]Uploads/URLs[/title]

The fields that take "uploaded" files allow you to select files direct from your computer.

The first image-like field will be injected into screen metadata (i.e. will come up on Facebook shares due to being the Open Graph image for the entry).

[title="3"]upload[/title]

{| 15em wide
! Type label
| An uploaded file
|-
! Storage format (for programmer reference)
| Up to 255 characters of text ([tt]<url>[::<original_filename>][/tt], or blank)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]filetype_filter[/tt] (comma-separated list of file extensions; default is not to have a filter)
|-
! Special field validation behaviour
| The entry will be rejected if a disallowed file was selected or uploaded.
|-
! Privacy (managing personal data) behaviour
| File will be deleted if entry owner purges their data if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__upload.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__upload.png[/media]
|}

[title="3"]upload_multi[/title]

{| 15em wide
! Type label
| Multiple uploaded files
|-
! Storage format (for programmer reference)
| [tt]<url>[::<original_filename>][/tt] separated by linebreaks
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)

[tt]filetype_filter[/tt] (comma-separated list of file extensions; default is not to have a filter)
|-
! Special field validation behaviour
| Disallowed files will be removed.
|-
! Privacy (managing personal data) behaviour
| Files will be deleted if entry owner purges their data if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__upload_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__upload_multi.png[/media]
|}

[title="3"]picture[/title]

{| 15em wide
! Type label
| An uploaded picture
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (URL, or blank)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]width[/tt] (the width all the media will be shown at; default is to auto-detect for each individual file)

[tt]height[/tt] (the height all the media will be shown at; default is to auto-detect for each individual file)

[tt]is_metadata[/tt] (set to '1' if the field should take precedence for metadata over earlier picture fields [and innate images], and '0' if it should never be the metadata field)

[tt]keep_gps=on|off[/tt] (whether to keep GPS metadata in images, which is stripped by default for privacy reasons; default is off)
|-
! Special field validation behaviour
| The entry will be rejected if the file is not a valid picture.
|-
! Privacy (managing personal data) behaviour
| File will be deleted if entry owner purges their data if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__picture.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__picture.png[/media]
|}

[title="3"]picture_multi[/title]

{| 15em wide
! Type label
| Multiple uploaded pictures
|-
! Storage format (for programmer reference)
| URLs separated by linebreaks
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]width[/tt] (the width all the media will be shown at; default is to auto-detect for each individual file)

[tt]height[/tt] (the height all the media will be shown at; default is to auto-detect for each individual file)

[tt]is_metadata[/tt] (set to '1' if the field should take precedence for metadata over earlier picture fields [and innate images], and '0' if it should never be the metadata field)

[tt]keep_gps=on|off[/tt] (whether to keep GPS metadata in images, which is stripped by default for privacy reasons; default is off)
|-
! Special field validation behaviour
| Invalid pictures will be removed.
|-
! Privacy (managing personal data) behaviour
| Files will be deleted if entry owner purges their data if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__picture_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__picture_multi.png[/media]
|}

[title="3"]video[/title]

{| 15em wide
! Type label
| An uploaded video
|-
! Storage format (for programmer reference)
| Up to 255 characters of text ([tt]<url>[ <width> <height> <length>][/tt], or blank)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]width[/tt] (the width all the media will be shown at; default is to auto-detect for each individual file)

[tt]height[/tt] (the height all the media will be shown at; default is to auto-detect for each individual file)
|-
! Special field validation behaviour
| The entry will be rejected if the file is not a valid video.
|-
! Privacy (managing personal data) behaviour
| File will be deleted if entry owner purges their data if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__video.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__video.png[/media]
|}

[title="3"]video_multi[/title]

{| 15em wide
! Type label
| Multiple uploaded videos
|-
! Storage format (for programmer reference)
| [tt]<url>[ <width> <height> <length>][/tt] separated by linebreaks
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]width[/tt] (the width all the media will be shown at; default is to auto-detect for each individual file)

[tt]height[/tt] (the height all the media will be shown at; default is to auto-detect for each individual file)
|-
! Special field validation behaviour
| Invalid videos will be removed.
|-
! Privacy (managing personal data) behaviour
| Files will be deleted if entry owner purges their data if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__video_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__video_multi.png[/media]
NB: You can see I uploaded a non-web-safe video as the first video. We do support these, but they'll only play on browsers with an appropriate plugin installed (unlike mine).
|}

[title="3"]url[/title]

{| 15em wide
! Type label
| A URL
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (URL, or blank); common URL errors will be fixed
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if the value is not a valid URL. If the URL is broken, the entry will be allowed but a warning will be displayed.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__url.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__url.png[/media]
|}

[title="3"]url_multi[/title]

{| 15em wide
! Type label
| Multiple URLs
|-
! Storage format (for programmer reference)
| URLs separated by linebreaks; common URL errors will be fixed
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)
|-
! Special field validation behaviour
| Invalid URLs will be removed from the list. Broken URLs will be allowed but a warning will be displayed.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__url_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__url_multi.png[/media]
|}

[title="3"]page_link[/title]

{| 15em wide
! Type label
| A page-link (i.e. in-site link)
|-
! Storage format (for programmer reference)
| Up to 255 characters of text ([tt]<page-link>[ <link-title>][/tt])
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if the provided page-link does not exist.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__page_link.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__page_link.png[/media]
|}

[title="3"]theme_image[/title]

{| 15em wide
! Type label
| An image from the xxx directory of theme images
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (theme image ID, or blank)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]width[/tt] (the width all the media will be shown at; default is to auto-detect for each individual file)

[tt]height[/tt] (the height all the media will be shown at; default is to auto-detect for each individual file)

[tt]is_metadata[/tt] (set to '1' if the field should take precedence for metadata over earlier picture fields [and innate images], and '0' if it should never be the metadata field)
|-
! Special field validation behaviour
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__theme_image.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__theme_image.png[/media]
|}

'xxx' may be any theme image directory. There is a version of this field type for each of them.
If you have manually added new theme images and are not seeing field types for them, empty the block cache. The field type list is cached using the block cache for performance reasons.

[title="2"]Magic fields[/title]

[title="3"]guid[/title]

{| 15em wide
! Type label
| A GUID (Globally-Unique Identifier)
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (though less stored)
|-
! Special default values
| N/A: Default is auto-assigned
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if the value is not alphanumeric.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| When adding there is no UI. When editing it looks like [tt]codename[/tt]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__guid.png[/media]
|}

[title="2"]References[/title]

[title="3"]isbn[/title]

{| 15em wide
! Type label
| ISBN code
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]strict_isbn_validation=on|off[/tt] (whether submitted values should strictly adhere to ISBN-10 or ISBN-13 checksums; default is 'off')
|-
! Special field validation behaviour
| If [tt]strict_isbn_validation=on|off[/tt] is defined as on, then the entry will be rejected if the value is not a valid ISBN.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__isbn.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__isbn.png[/media]
|}

[title="3"]reference[/title]

{| 15em wide
! Type label
| A reference to a catalogue entry in xxx catalogue
|-
! Storage format (for programmer reference)
| Content ID (to whatever catalogue the reference is for), or blank
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if the given reference does not exist.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__reference.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__reference.png[/media]
|}

'xxx' may be any catalogue. There is a version of this field type for each of them.

[title="3"]reference_multi[/title]

{| 15em wide
! Type label
| Multiple references to a catalogue entry in xxx catalogue
|-
! Storage format (for programmer reference)
| Content IDs (to whatever catalogue the reference is for) separated by linebreaks
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)
|-
! Special field validation behaviour
| References which do not exist will be removed from the list.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__reference_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__reference_multi.png[/media]
|}

'xxx' may be any catalogue. There is a version of this field type for each of them.

[title="3"]content_link[/title]

{| 15em wide
! Type label
| A link to an item of 'xxx' content
|-
! Storage format (for programmer reference)
| Content ID, or blank
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if the content does not exist.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__content_link.png[/media]
NB: Where we support Composr tree-list inputters (like shown for 'reference') for the content types that use them. This screenshot shows input for a 'poll', which is a flat structure and hence just works via a normal drop-down list.
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__content_link.png[/media]
|}

'xxx' may be any content type. There is a version of this field type for each of them.

[title="3"]content_link_multi[/title]

{| 15em wide
! Type label
| Multiple links to an item of 'xxx' content
|-
! Storage format (for programmer reference)
| Content IDs separated by linebreaks
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)
|-
! Special field validation behaviour
| Links to content which do not exist will be removed from the list.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__content_link_multi.png[/media]
NB: Where we support Composr tree-list inputters (like shown for 'reference') for the content types that use them. This screenshot shows input for a 'poll', which is a flat structure and hence just works via a normal drop-down list.
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__content_link_multi.png[/media]
|}

'xxx' may be any content type. There is a version of this field type for each of them.

[title="3"]member[/title]

{| 15em wide
! Type label
| A member ID
|-
! Storage format (for programmer reference)
| Member ID, or null
|-
! Special default values
| [tt]![/tt]: Current user's username
|-
! Supported field options
| [i]None[/i]
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Member ID[/tt] (additional member ID fields) criteria. Ignores the 'May contain personal information' setting as member IDs are always sensitive.
|-
! Special field validation behaviour
| The entry will be rejected if the given member ID does not exist.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__member.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__member.png[/media]
|}

[title="3"]member_multi[/title]

{| 15em wide
! Type label
| Multiple member IDs
|-
! Storage format (for programmer reference)
| Member IDs separated by linebreaks
|-
! Special default values
| [tt]![/tt]: Current user's username
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)
|-
! Special field validation behaviour
| Member IDs which do not exist will be removed from the list.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Member ID[/tt] (additional member ID fields) criteria. Ignores the 'May contain personal information' setting as member IDs are always sensitive.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__member_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__member_multi.png[/media]
|}

[title="3"]username[/title]

{| 15em wide
! Type label
| A username
|-
! Storage format (for programmer reference)
| Username, or null
|-
! Special default values
| [tt]![/tt]: Current user's username
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i] (to allow specifying old usernames)
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Username[/tt] criteria. Ignores the 'May contain personal information' setting as usernames are always sensitive.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__username.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__username.png[/media]
|}

[title="3"]username_multi[/title]

{| 15em wide
! Type label
| Multiple usernames
|-
! Storage format (for programmer reference)
| Usernames separated by linebreaks
|-
! Special default values
| [tt]![/tt]: Current user's username
|-
! Supported field options
| [tt]auto_sort=on|off[/tt] (whether to sort the entered options; default is off)
|-
! Special field validation behaviour
| [i]None[/i] (to allow specifying old usernames)
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Username[/tt] criteria. Ignores the 'May contain personal information' setting as usernames are always sensitive.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__username_multi.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__username_multi.png[/media]
|}

[title="3"]author[/title]

{| 15em wide
! Type label
| An author configured on the system
|-
! Storage format (for programmer reference)
| Up to 255 characters of text (author)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if the given author does not exist.
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__author.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__author.png[/media]
|}

[title="2"]Other[/title]

[title="3"]color[/title]

{| 15em wide
! Type label
| A colour
|-
! Storage format (for programmer reference)
| Colour hex code with no "#" (e.g. AAAAAA), or blank
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if the value is not a valid color.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__color.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__color.png[/media]
NB: There is no special styling by default: this field exists so as to provide a colour-picker field input for those who will then take the data and use it in a useful way.
|}

[title="3"]date_time[/title]

{| 15em wide
! Type label
| A date and time (converts to a member's timezone automatically)
|-
! Storage format (for programmer reference)
| yyyy-mm-dd hh:mm, or blank (input is assumed in member's time zone and converted to UTC before storage)
|-
! Special default values
| [i]Y-X[/i], where X is a number (whatever year the current year would be if X was subtracted)
[i]Y+X[/i], where X is a number (whatever year the current year would be if X was added)
|-
! Supported field options
| [tt]min_year=YYYY[/tt] (defaults to 0ad)

[tt]max_year=YYYY[/tt] (defaults to 3000ad)

[tt]range_search=on|off[/tt]: search forms will allow a range-based search
|-
! Special field validation behaviour
| The entry will be rejected if the given date and time is invalid.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__date_time.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__date_time.png[/media]
|}

[title="3"]date[/title]

{| 15em wide
! Type label
| A date
|-
! Storage format (for programmer reference)
| yyyy-mm-dd, or blank (due to fixed alignment, string inequality comparisons work effectively)
|-
! Special default values
| [i]Y-X[/i], where X is a number (whatever year the current year would be if X was subtracted)
[i]Y+X[/i], where X is a number (whatever year the current year would be if X was added)
|-
! Supported field options
| [tt]min_year=YYYY[/tt] (defaults to 0ad)

[tt]max_year=YYYY[/tt] (defaults to 3000ad)

[tt]range_search=on|off[/tt]: search forms will allow a range-based search
|-
! Special field validation behaviour
| The entry will be rejected if the given date is invalid.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__date.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__date.png[/media]
|}

[title="3"]time[/title]

{| 15em wide
! Type label
| A time
|-
! Storage format (for programmer reference)
| hh:mm, or blank (due to fixed alignment, string inequality comparisons work effectively)
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]range_search=on|off[/tt]: search forms will allow a range-based search
|-
! Special field validation behaviour
| The entry will be rejected if the given time is invalid.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__time.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__time.png[/media]
|}

[title="3"]tel[/title]

{| 15em wide
! Type label
| A telephone number
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| [i]None[/i] (there are too many variations to telephone numbers that it is unreasonable to check for them)
|-
! Privacy (managing personal data) behaviour
| Will match against [tt]Other[/tt] (additional anonymise fields) criteria if 'May contain personal information' is ticked/checked. [i]Highly recommended for all telephone fields which could contain personal numbers.[/i]
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__tel.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__tel.png[/media]
|}

[title="3"]tax_code[/title]

{| 15em wide
! Title
| A tax code
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [tt]in_money=on|off[/tt]: Show the tax in money, rather than as a tax code (will use the user's address for tax calculation if known, otherwise the site address)
|-
! Special field validation behaviour
| The entry will be rejected if an invalid tax code was given.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__tax_code.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__tax_code.png[/media]
|}

[title="3"]year_month[/title]

{| 15em wide
! Title
| A year month
|-
! Storage format (for programmer reference)
| Up to 255 characters of text
|-
! Special default values
| [i]None[/i]
|-
! Supported field options
| [i]None[/i]
|-
! Special field validation behaviour
| The entry will be rejected if an invalid year or month was given.
|-
! Privacy (managing personal data) behaviour
| Will be anonymised if entry owner requests if 'May contain personal information' is ticked/checked.
|-
! Back-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_backend__year_month.png[/media]
|-
! Front-end UI
| [media framed="1" wysiwyg_editable="1" thumb="0" width="600"]data_custom/images/docs/tut_fields/core_fields_frontend__year_month.png[/media]
|}

[title="2"]Blank fields[/title]

In almost all cases a field left as blank will not show in the default templates at all.
'color' is the only exception to this (at the time of writing), as there is no way to actually leave that input field blank.

[title="2"]Styling multiple-selection fields[/title]

The fields that support multiple-selection will typically output the different selections sequentially without much styling. It is up to the theme designer to write CSS rules to lay these out in an appropriate way.

[title="2"]Programming (advanced)[/title]

Generally the fields system is built on top of the lower level fields API within Composr, which is itself built on standard Composr templates.

[title="3"]Extending the set of fields[/title]

Programmers may add new field types by writing new [tt]systems/fields[/tt] hook code files and referring to existing field hooks to see how they are written.

[concepts
 1_key="Front-end"   1_value="The regular website"
 2_key="Back-end"    2_value="The administration, adding, editing, etc"
]Concepts[/concepts]

[title="2"]See also[/title]

 - [page="_SEARCH:tut_catalogues"]Custom structured content (via catalogues)[/page]

{$SET,tutorial_tags,core_fields,catalogues,Power tools,novice}{$SET,tutorial_add_date,Apr 2015}{$SET,tutorial_summary,Detailed information on the different field types supported by Composr.}[block]main_tutorial_rating[/block]
