[TYPO3-dev] Dynamic type field default value on record creation based on parent record type
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Thu Apr 29 10:42:56 CEST 2010
*bump* Noone?
Would be really nice if someone comes
up with a hint or an idea - I'm kinda stuck witht his.
Thanks a lot and have a nice day!
Thomas
Am 28.04.2010 01:31, schrieb Thomas "Thasmo" Deinhamer:
> Sorry for the long title, but I refused to md5-revert-camelcase it for
> different reasons. ;o)
>
> What I would like to achieve is this:
>
> On creation of an IRRE record the type of this IRRE record should NOT be
> set to the default value, but rather to a specific type, based on the
> already set type value of the parent record.
>
> This means if the actual record (parent record) is of type 'phoenix',
> all newly created IRRE records also should have the initial type value
> of 'phoenix' and not '0' (zero) or NULL.
>
> It seems TYPO3 does NOT set the initial value based on the items array,
> but just sets it to NULL or an empty string, if the 'default' key is not
> set in the 'config' array. (Besides that, the 'default' value can only
> be set to a static string, which doesn't solve the problem.)
>
> This makes settings the initial value of the type field of the IRRE
> record impossible using an itemsProcFunc, which would return ONLY the
> desired type (like an array with only 1 item).
>
> Now I was wondering if there is any solution to this? The only thing
> which could work, I can think of, is a hook which would fire before the
> form of the IRRE record gets rendered - there it may be possible to
> manipulate the 'default' value of the type field.
>
> Any ideas?
>
> Thanks a lot for your help,
> Thomas
More information about the TYPO3-dev
mailing list