Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source MagazineAOE Media

6.4. Create Tab

Last fields are explained in WorkSpace section...

Flexform Setup Field

Description

Disable Create

If set it will not be possible to create new recors (no add element button)

Create Preview

A preview of insertion fields will be shown for validation before definite submission of elements

Show status screen

If set a status screen will be shown after creation or preview.

Show no special form when logged in

...

Creation Fields

List of fields to handle during creation (including hidden override fields ..)

Creation show fields

List of fields to appear on screen (in order of appearance). It is possible to add 'tab' field where you wish. Fields appearing after tab field will only appear in selected tab (if tab setting is set in general settings).

Note: Tab mode must be selected (see General Settings fields) and the flexform must be saved before the [Tab] item will show  up as an option in the Show fields area.  Then, only one Tab marker can be added at a time. Save the flexform and you will be able to add another Tab marker.

It is possible to select a single field more than once in this area (if you save the flexform in between).  However, only the first occurance will be rendered.  [This is necessary in order to allow more than one Tab marker]

Read Only Fields

List of fields that will appear in read only (preview)  mode. It will not be possible to modify these fields.

Create Override values

Override values of fields. These values will be set upon insert.

Possible values are :

  1. integers and strings .

  2. All values of the getData function

field : [fieldname from the current $cObj->data-array in the cObj.]

As default the $cObj->data-array is $GLOBALS["TSFE"]->page (record of the current page!)

In TMENU: $cObj->data is set to the page-record for each menuitem.

In CONTENT/RECORDS $cObj->data is set to the actual record

In GIFBUILDER $cObj->data is set to the data GIFBUILDER is supplied with.

parameters  : [fieldname from the current $cObj->parameters-array in the cObj.]

See  ->parseFunc!

register : [fieldname from the $GLOBALS["TSFE"]->register]

See cObject "LOAD_REGISTER"

leveltitle, leveluid, levelmedia: [levelTitle, uid or media in rootLine, 0- , negative = from behind, “ , slide” parameter forces a walk to the bottom of the rootline until there's a “true” value to return. Useful with levelmedia.]

levelfield: Like “leveltitle” et al. but where the second parameter is the rootLine field you want to fetch. Syntax: [pointer, integer], [fieldname], [“slide”]

global : [GLOBAL-var, split with | if you want to get from an array! DEPRECIATED, use GPvar, TSFE or getenv]

date : [date-conf]

page : [current page record]

current : 1 (gets 'current' value)

level : 1  (gets the rootline level of the current page)

GPvar: Value from GET or POST method. Use this instead of global

TSFE: Value from TSFE global main object

getenv: Value from environment vars

getIndpEnv: Value from t3lib_div::getIndpEnv()

DB: Value from database, syntax is [tablename] : [uid] : [field]. Any record from a table in TCA can be selected here. Only marked-deleted records does not return a value here.

fullRootLine : This gets the title “1. page before” in a page tree like the one below provided we are are the page “Here you are!” (or “Site root”) and this TypoScript is in the template with root at “Site root”. Red numbers indicate what values of keynumber would point to:

- Page tree root   -2

   |- 1. page before   -1

      |- Site root (root template here!)   0

         |- Here you are!  1

LLL: Reference to a locallang (php or xml) label. Reference consists of [fileref]:[labelkey]

path: path to a file, possibly placed in an extension, returns empty if the file doesn't exist.

cObj: [internal variable from list: “parentRecordNumber”]

debug: Returns HTML formated content of PHP variable defined by keyword. Available keys are “rootLine”, “fullRootLine”, “data”

--------------------

Getting more values.

By separating the value of getText with "//" (double slash) you let getText fetch the first value. If it appears empty ("" or zero) the next value is fetched and so on. Example:

= field:header // field:title // field:uid

This gets "title" if "header" is empty. If "title" is also empty it gets field "uid"

fullRootLine :

Getting a value from the rootline (TSFE->rootLine) going all the way to the root of the page tree.

[keynumber, fieldname, “slide”]

Keynumber is relative to the current site root, so negative numbers refer to subsequent levels below the site root. Fieldname is the name of the datafield to get. For “slide”, see levelmedia type above.

I added a few new ones to this :

  1. feuser : Reference to the connected feuser, key of feuser record is returned. Ex feuser:email returns email of connected user ...

  2. dbf : Reference to result of sql data query. Syntax dbf:selecttable:idfield:uidfieldindatarecord:where:groupby:orderby:limit:returnvaluefield

Create Eval Values

Configuration of field evaluation.

Some of these evaluation keywords will trigger a JavaScript pre-evaluation in the form. Other evaluations will be performed in the backend.

The eval-functions will be executed in the list-order.

Keywords:

  1. required : A non-empty value is required in the field (otherwise the form cannot be saved).

  2. unique,uniqueGlobal : Requires the field to be unique for the whole table. (Evaluated on the server only). NOTICE: When selecting on unique-fields, make sure to select using “AND pid>=0” since the field CAN contain duplicate values in other versions of records (always having PID = -1). This also means that if you are using versioning on a table where the unique-feature is used you cannot set the field to be truely unique in the database either!

  3. UniqueInPid,UniqueLocal : Requires the field to be unique for the current PID (among other records on the same page). (Evaluated on the server only)

  4. date : The field will evaluate the input as a date, automatically converting the input to a UNIX-time in seconds. The display will be like "12-8-2003" while the database value stored will be "1060639200".

  5. datetime : The field will evaluate the input as a date with time (detailed to hours and minutes), automatically converting the input to a UNIX-time in seconds. The display will be like "16:32 12-8-2003" while the database value will be "1060698720".

  6. time : The field will evaluate the input as a timestamp in seconds for the current day (with a precision of minutes). The display will be like "23:45" while the database will be "85500".

  7. md5 : Will convert the inputted value to the md5-hash of it (The JavaScript MD5() function is found in typo3/md5.js)

  8. password : Will show "*******" in the field after entering the value and moving to another field. Thus passwords can be protected from display in the field. Notice that the value during entering it is visible!

    To be documented

  9. twice

  10. uniqueFields

  11. atLeast

  12. atMost

  13. invert

  14. inBranch

  15. unsetEmpty

I added a few new ones to this :

  1. email : Requires the field to be in email format

  2. wwwUrl : Requires field to be a vallid URI

    To be implemented :

  3. timesec : The field will evaluate the input as a timestamp in seconds for the current day (with a precision of seconds). The display will be like "23:45:13" while the database will be "85513".

  4. year : Evaluates the input to a year between 1970 and 2038. If you need any year, then use "int" evaluation instead.

  5. is_in : Will filter out any character in the input string which is not found in the string entered in the key "is_in" (see below).

  6. double2 : Converts the input to a floating point with 2 decimal positions, using the "." (period) as the decimal delimited (accepts also "," for the same).

All the above evaluations (unless noted) are done by JavaScript with the functions found in the script t3lib/jsfunc.evalfield.js

"(TCE)"  means the evaluation is done in the TCE on the server. The class used for this is t3lib_TCEmain.

Example:

Setting the field to evaluate the input to a date returned to the database in UNIX-time (seconds) which is mandatory

myfield=date,required

Create Page Pid

Pid of create page allows  to seperate FE editing onto a different page...

Not tested