[Typo3-dev] Inserting default data when an extention is installed.

S. Teuber traveler_in_time at gmx.net
Thu Feb 12 13:02:45 CET 2004


Hi Michael,


> I've added insert statements to ext_tables.sql but this doesn't
>  seem to make a difference although if I change the create statement
>  it appears to be effective.

Try altering the field description in ext_tables.php, setting a key 
'default' with the proper value:

'tx_myext_sometext' => Array (		
	'exclude' => 1,		
	'label' => 'LLL:EXT:my_ext/locallang_db.php:pages.tx_myext_sometext',		
	'config' => Array (
		'type' => 'input',	
		'size' => '30',	
		'max' => '50',
		'default' => 'Default value',
	)
),

This works with checkboxes, never tried it with textfields, though.

Sven




More information about the TYPO3-dev mailing list