[TYPO3] Problems with save and close and save and new in my extension...

Andrew Plank plankmeister_NO at SPAM_hotmail.com
Mon Jun 9 14:33:03 CEST 2008


Hi all extension/TCA experts!

I have an extension that allows users to select images, using the 
built-in file/object browser. As I need to do some processing on the 
image before it gets saved to the DB, I have the following in my TCA:

'select_image' => Array (
	'exclude' => 1,
	'label' => 'Select an image to use as a logo',
	'config' => Array (
		'type' => 'user',
		'userFunc' => 'user_CustomFormFields->user_customSelectImage',
		'internal_type' => 'file',
			'allowed' => 'jpg,jpeg,gif,png',
		'size' => '3',
		'autosizemax' => 10,
		'maxitems' => '1',
		'selectedListStyle' => 'width:400px;',
		'minitems' => '0',
		'show_thumbs' => '0',
	)
),		

Which works a treat. I then do a bunch of checking and processing on the 
values returned from the field, before outputting the required HTML. It 
works up to a point...

However, if the user clicks "save and new" or "save and close" then my 
userfunc is not called, and the required processing of the selected 
image file does not occurr. Which is a problem... It means I have to 
click "save" first, then I can click "save and new" or "save and close".

How can I force it to run my code? I've also tried adding 
"itemsProcFunc" but that doesn't do it either.

Hope there's a solution!

//Plankmeister


More information about the TYPO3-english mailing list