Skip to content
Advertisement

TYPO3 fill backend fields in content element with database values

I’m trying to distribute JSON data from inside a tt_content database field into the other existing fields, like the TYPO3 default input field header.

I tried finding a hook which lets me handle the distribution manually like I could while saving via

JavaScript

in my ext_localconf.php. I couldn’t find one. So I took a look at the TCA to see if there are possible settings I can use, but I couldn’t as well.

Do you know a way on how to do this data distribution manually?

Advertisement

Answer

I found the solution:

You have to do 2 things in your ext_localconf.php file

To change data before saving to the database you have to call:

JavaScript

To handle data before it’s being loaded to the backend fields:

JavaScript

For loading into the frontend or template you need in your setup typoscript:

JavaScript

All those classes can be compared to the corresponding core classes.

I hope this helps someone in the future.

Kind regards!

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement