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

Vikram Mandal vikram at fivee.in
Fri Sep 14 15:40:46 CEST 2007


Vikram Mandal wrote:
> 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",


Correction here:

Works fine when the flexform_xml field is set correct by default.  e.g.

"flexform_xml" => Array (
			"exclude" => 1,
			"label" => 
"LLL:EXT:5e_maps/locallang_db.xml:tx_5emaps_true_false_questions.flexform_xml",
			"config" => Array (
				'type' => 'flex',
				'ds_pointerField' => 'list_type',
				'ds' => array (
					'default' => 'FILE:EXT:5e_maps/TFQ_DISC_flexform.xml',
				)
             )


Regards,
Vikram
--
http://fivee.in




More information about the TYPO3-dev mailing list