[TYPO3-english] Something like eval to other field types or other ideas to auto-fill IRRE form

Guillermo R. Oramas J. oramas.g at gmail.com
Sat Jul 23 15:32:34 CEST 2011


Thanks Mathias.

I read the article and I used the hook that you suggest to me, and built
exactly what I need.

Your help was very useful to me.

I saw some traps as you said, in special because the hook is called each
time you save a form no matters if is related or not, so it is necessary to
"filter" when to trigger the code with "if" conditions and understand the
parameters that are passed to the function each time, that in the case of
use IRRE fields is a little bit more complex.

So, I insist in there will be cool if Typo3 could have more precise tools
for do that, like I wrote before: " I think that the functionality of use
data from other fields is basic and it could be something to add to Typo3 in
order to be more powerful and less restrictive. I could name many examples
for that: Auto-fill forms, make math operations, concatenations, etc... It
would be cool that each field could launch custom functions to do this, like
the input type do through the eval custom functions."

Best regards.

Am 16.07.11 16:31, schrieb Guillermo R. Oramas J.:
> I appreciate more information about hooks that I can use in this
situation.
> I read the Core API documentation but I'm confusing about how they 
> works and how to call them.

Hooks are implemented so you can interact with the "flow" of data within
TYPO3.

Imagine something like this:
Data is entered by a user, the "SAVE" button is clicked and after that the
"new" form is rendered.

Here you have at least two hooks you can "hook" into that flow.
a) before the data was actually stored in the database. Useful to validate
things.
b) after the data was stored in the database. Useful when you need IDs of
newly created records.

Check this out:
http://typo3.org/development/articles/how-to-use-existing-hooks/

And also this might help you finding the hook you want to use:
processDatamap_afterDatabaseOperations()

cheers
mathias

--
Ernesto, Nov. 9th 2010:
"In the graphics generation routines of TYPO3 *anything* could cause a side
effect."



More information about the TYPO3-english mailing list