Core API

4.2.6. ['columns'][fieldname]['config'] / TYPE: "text"

This field type generates a <textarea> field or inserts a RTE (Rich Text Editor).

Such a field looks like this:

 


 

Key

Datatype

Description

Scope

type

string

[Must be set to "text"]

Display / Proc.

cols

integer

Abstract value for the width of the <textarea> field. To set the textarea to the full width of the form area, use the value 48. Default is 30.

Display

rows

integer

The number of rows in the textarea. May be corrected for harmonisation between browsers. Will also automatically be increased if the content in the field is found to be of a certain length, thus the field will automatically fit the content.

 

Default is 5. Max value is 20.

Display

wrap

["off", "virtual"]

Determines the wrapping of the textarea field. There are two options:

 

"virtual": (Default) The textarea will automatically wrap the lines like it would be expected for editing a text.

"off": The textarea will not wrap the lines as you would expect when editing some kind of code.

 

Notice: If the string "nowrap" is found among options in the fields extra configuration from the "types" listing this will override the setting here to "off".

 

Example:

This configuration will create a textarea useful for entry of code lines since it will not wrap the lines:

 

                  "config" => Array (
                      "type" => "text",
                      "cols" => "40",    
                      "rows" => "15",
                      'wrap' => 'off',
                  )

Display

default

string

Default value

Display / Proc.

wizards

array

[See section later for options]

Display

 

Now follows some codelistings as examples:

Example: A quite normal field

This is the typical configuration for a textare field:

              'message' => Array (
                  'label' => 'LLL:EXT:sys_note/locallang_tca.php:sys_note.message',
                  'config' => Array (
                      'type' => 'text',
                      'cols' => '40',    
                      'rows' => '15'
                  )
              ),

To top


Valid XHTML 1.0!