TSRef - TypoScript Reference

7.1.7. "FE_TABLE":

Property:

Data type:

Description:

Default:

default.[field]

string

This property is in charge of which default-values is used for the table:

 

Example:

This defines the default values used for new records. These values will be overridden with any value submitted instead (as long as the submitted fields are allowed due to "allowNew")

default {

  subject = This is the default subject value!

  hidden = 1

  parent = 0

}

 

allowNew.[field]

string

This property is in charge of which fields that may be written from the frontend.

 

Example:

This defines that subject is a field, that may be submitted from the frontend. If a value is not submitted, subject is filled with the default value (see above).

The field "hidden" on the other hand cannot be changed from the frontend. "hidden" will gain the value from the default definition (see above). If fields are set to "0" (zero) it's the same as if they were not defined in this array.

 

allowNew {

  subject = 1

  hidden = 0

}

 

allowEdit.[field]

string

Same as above ("allowNew") but this controls which fields that may be written in case of an update of a record (and not a new submission)

Please pay attension to the property below!  ("overrideEdit")

 

overrideEdit.[field]

string

This works like default-values above but is values inserted after the submitted values has beed processed. This means that opposite to default-values overwritten by the submitted values, these values override the submitted values.

 

Example:

In this case overrideEdit secures that if a user updates his record (if he "own" it) the "hidden"-field will be set no matter what.

 

overrideEdit {

  hidden = 1

}

 

userIdColumn

string (field)

This is a string that points to the column of a record where the user-id of the current fe_user should be inserted. This fe_user-uid is inserted/updated both by "new" and "edit"

 

autoInsertPID

boolean

Works with new records: Insert automatically the PID of the page, where the submitted data is sent to. Any "pid" supplied from the submitted data will override. This is for convenience.

 

processScript

resource

Include-script to be used for processing of incoming data to the table. The script is included from a function in the class tslib_fetce

This is the really important option, because whether or not you are going to utilize the "cleaning"/"authorization" features of the properties above depend on how you write your script to process data and put it in the database.

A very good example is to look at "media/scripts/guest_submit.inc", included from static_template "plugin.tt_guest" (Used for the default guestbook feature)

 

separator

string

Separator character used when the submitted data is an array from eg. a multiple selector box.

chr(10) (linebreak)

doublePostCheck

string (fieldname)

Specifies a fieldname (integer) into which an integer-hash compiled of the submitted data is inserted. If the field is set, then submissions are checked whether another record with this value already exists. If so, the record is NOT inserted, because it's expected to be a "double post" (posting the same data more than once)

 

[tsref:FEData.(tablename)/->FE_TABLE]


Valid XHTML 1.0!