[TYPO3] Alter TCA - making something required

Tapio Markula tapio.markula at dnainternet.net
Tue Mar 28 10:45:22 CEST 2006


Peter Klein wrote:
> Hi Tapio. Read the "TYPO3 Core APIs" Manual..
> 
> http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/view/4/2/
> 
> (Look for "eval")

Ok.

$tempColumns = Array (
		'newUntil' => Array (
			'exclude' => 1,
			'label' => 'LLL:EXT:cms/locallang_tca.php:pages.newUntil',
			'config' => Array (
				'type' => 'input',
				'size' => '8',
				'max' => '20',
				'eval' => 'required,date',
				'checkbox' => '0',
			)
		),
);

t3lib_extMgm::addTCAcolumns("pages",$tempColumns,1);

The problem is the default value is for the database '0'

For existing pages can't force to change.

And Copying pages takes automatic '0' value.
Just creating new pages, works.


Maybe should even set NULL accepted in the database and without
default value - or does it cause some problems.



More information about the TYPO3-english mailing list