Search code examples
symfonysonata-admin

How to disable error tooltips on admin forms


How can I disable error tooltips on forms that are generated by Sonata Admin bundle? I'd rather show errors below fields instead of tooltips.

These error messages are rendered inline by the Sonata, but then some JavaScript code removes them from DOM and changes into dynamic tooltips.

Is there a configuration option to disable this behaviour?


Solution

  • You can add a javascript code that overrides Sonata admin functionality

    For example:

    var Admin = Admin || {};
    
    // disable popover error messages
    Admin.add_pretty_errors = function(){};