[TYPO3-dev] What is the best way to add custom JS events on TCA fields in BE?
Benjamin Beck
BenjaminBeck at gmx.de
Mon Aug 22 10:13:06 CEST 2011
Hello,
i am new to Typo, so i am not sure if this works:
Maybe you can add a custom js include file via typoscript and attach the js-event unobtrusive:
http://stackoverflow.com/questions/259614/unobtrusive-javascript-with-jquery-good-10-minute-tutorial
You could identify the input field by it´s name (the id seems to change on every reload).
$('input["name"="data[tx_extname][6][namenszusatz]_hr"]').click(function() {
alert("hello world");
});
Let me know if this works - maybe i have to do this in a few days too.
Greetings
Benjamin
On Aug 22, 2011, at 9:40 AM, Peter Klein wrote:
> What is the best way to add custom JS events on TCA fields in BE?
>
> I have an extension with several fields (FlexForm), where I want to
> add a custom JS event every time the field is changed (on the clients
> side.)
>
> I have looked at rendering the fields as "user", but then I would
> loose the standard field setups.
>
> Another option I looked at, was using a wizard, but in both cases I
> have to add my JS to the $PA['fieldChangeFunc'] array, and then
> re-render each field type manually, which seems way to complicated for
> such a simple task.
>
> Is there some other method I have missed?
>
> --
> Peter Klein
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
More information about the TYPO3-dev
mailing list