[TYPO3-dev] file upload fails in Flexform when using hooks

Vikram Mandal vikram at fivee.in
Fri Sep 14 15:23:11 CEST 2007


Hi,

I have used hook to load different flexforms depending on value of a 
selectbox.

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'][] 
= 
'EXT:5e_maps/lib/class.tx_5emaps_questionTypeHandler.php:tx_5emaps_questionTypeHandler';


TCA Entry
-----------
question_type" => Array (
			"exclude" => 1,
			"label" => 
"LLL:EXT:5e_maps/locallang_db.xml:tx_5emaps_true_false_questions.question_type",
			"config" => Array (
				"type" => "select",
				"items" => Array (
				 
Array("LLL:EXT:5e_maps/locallang_db.xml:tx_5emaps_true_false_questions.question_type.I.1", 
"TFQ_Limited"),
				 
Array("LLL:EXT:5e_maps/locallang_db.xml:tx_5emaps_true_false_questions.question_type.I.2", 
"TFQ_DISC"),
				),
				"size" => 1,
				"maxitems" => 1,
				"default" => "TFQ_Limited",
			)
		),


-----------


The file upload works for the flexform which is set as the default. i.e. 
  "default" => "TFQ_Limited",


Although in the hook script I am setting default to the other flexform.
$TCA[$table]['columns']['flexform_xml']['config']['ds']['default'] = 
'FILE:EXT:5e_maps/TFQ_DISC_flexform.xml';

Any help will be appreciated a lot! It's a bit desperate situation.

Regards,
Vikram











More information about the TYPO3-dev mailing list