[Typo3-dev] Default value for the radio button

Michael Scharkow mscharkow at gmx.net
Mon Jan 17 11:28:33 CET 2005


Richard Piacentini wrote:
> Hi Dmitry,
> 
> there's in fact a bug with flexform and default values, 
> you'll have more info here:
> 
> http://bugs.typo3.org/bug_view_page.php?bug_id=0000214

As I have complained here before, this is _not_ new and not minor IMHO.

I have investigated in this today, and there seems to be no easy way out 
because the regular $TCA defaults are written to the db when a new 
record is created and are updated when you fill in the fields.

However, since flexforms are essentially one single field, the defaults 
(if there were some) would have to be derived from the general 
pi_flexform definition in $TCA. This would, of course, be useless 
because every plugin has different default values.

So in order to get FlexForm default values, you probably have to hack 
the t3lib_tcemain::newFieldArray($table) to do special things if

$field['config']['type'] = pi_flexform (or such)

and than return a proper xml filled with the default values.

I hope to have encouraged someone who actually does understand the 
internals of flexforms to write this *really* useful feature. I am more 
than willing to help out but I can't do this alone because I'm even more 
a XML fool than a PHP dummy.

Greetings,
Michael




More information about the TYPO3-dev mailing list