Url

The "Url" type generates a simple <input> field, which handles different kinds of links.

It corresponds with the TCA type='input' and renderType='inputLink'.

Properties

autocomplete

| Required: false | Type: boolean | Default: 'false' |

Controls the autocomplete attribute of a given input field. If set to true (default false), adds attribute autocomplete="on" to the input field allowing browser auto filling the field.

default

| Required: false | Type: string | Default: '' |

Default value set if a new record is created.

linkPopup

| Required: false | Type: array | Default: '' |

The link browser control is typically used with type='input' with renderType='inputLink' adding a button which opens a popup to select an internal link to a page, an external link or a mail address.

allowedExtensions (string, list)

Comma separated list of allowed file extensions. By default, all extensions are allowed.

blindLinkFields (string, list)

Comma separated list of link fields that should not be displayed. Possible values are class, params, target and title. By default, all link fields are displayed.

blindLinkOptions (string, list)

Comma separated list of link options that should not be displayed. Possible values are file, folder, mail, page, spec, telephone and url. By default, all link options are displayed.

Example:

linkPopup:
  allowedExtensions: 'pdf'
  blindLinkFields: 'target,title'
  blindLinkOptions: 'folder,spec,telefone,mail'
  windowOpenParameters: 'height=800,width=600'
max

| Required: false | Type: integer | Default: '700' |

Value for the “maxlength” attribute of the <input> field. Javascript prevents adding more than the given number of characters.

placeholder

| Required: false | Type: string | Default: '' |

Placeholder text for the field.

required

| Required: false | Type: boolean | Default: 'false' |

If set, the field will become mandatory.

size

| Required: false | Type: integer | Default: '20' |

Abstract value for the width of the <input> field.

trim

| Required: false | Type: boolean | Default: 'false' |

If set, the PHP trim function is applied on the field's content.

valuePicker

| Required: false | Type: array | Default: '' |

Renders a select box with static values next to the input field. When a value is selected in the box, the value is transferred to the field. Keys:

items (array)

An array with selectable items. Each item is an array with the first being the value transferred to the input field, and the second being the label in the select drop-down (LLL reference possible).

Example:

valuePicker:
  items:
    'https://www.typo3.org': TYPO3 CMS
    'https://www.typo3.com': TYPO3 GmbH

Example

group: common
fields:
  - identifier: url
    type: Url
    properties:
      autocomplete: true
      default: 'https://typo3.org'
      linkPopup:
        allowedExtensions: 'pdf'
        blindLinkFields: 'target,title'
        blindLinkOptions: 'folder,spec,telefone,mail'
      max: 150
      placeholder: 'Placeholder text'
      required: false
      size: 20
      trim: true
      valuePicker:
        items:
          'https://www.typo3.org': TYPO3 CMS
          'https://www.typo3.com': TYPO3 GmbH