Verwendung: Custom Elements und onsubmitCallback (onsubmit_callback)

andi.juen's Avatar


21 Apr, 2016 05:22 AM

Produkt: Custom Elements Contao


habe versucht onsubmitCallback in einem CE anzuwenden, wird aber einfach ignoriert.

'onsubmitCallback' => array( array('CustomController', 'function') ),

Der onloadCallback funktioniert.

'onloadCallback' => array( array('CustomController', 'function') ),

Ist ein onsubmitCallback nicht konfigurierbar?

Danke und Viele Grüße

  1. Support Staff 1 Posted by RockSolid Theme... on 21 Apr, 2016 07:58 AM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Frage.

    Sie können den onsubmit_callback über den onloadCallback des Custom Elements hinzufügen:

    'onloadCallback' => array(
        function() {
            $GLOBALS['TL_DCA']['tl_content']['config']['onsubmit_callback'][] = array('CustomController', 'function');
  2. 2 Posted by andi.juen on 21 Apr, 2016 07:59 AM

    andi.juen's Avatar

    Perfekt, vielen Dank! :-)

  3. 3 Posted by aldorr on 29 Jul, 2016 02:00 PM

    aldorr's Avatar

    This comment was split into a new discussion: Custom Elements onsubmit callback

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac