Search code examples
symfony4sonata-admin

Is there a way to add a hint to a field in Sonata Admin


Is there a way to add a hint or some kind of explenation to a field in Sonata Admin?

Something like this:

[Label]*
[ -- The field -- ]
// here should be the description of the field

I did not find anything about this in the docu, so I guess it is somehow done by some kind of template override or the like?


Solution

  • We'll reading the other documentation helps ;) - looks like it is simply inherited from Symfony FormType.

    For example:

    $formMapper->add('slug', TextType::class, [
        'help' => 'Used as URL or the linked page'
    ])