Symfony2 Sonata Admin show attribute only as a readyonly text

扶醉桌前 提交于 2019-12-03 02:44:23
$formMapper
    ->add('post', 'entity', 
        array(
            'label' => 'Some post',
            'read_only' => true,
            'disabled'  => true,
            'class' => 'Acme\DemoBundle\Entity\Post'
        )
    )
;
TautrimasPajarskas

This answer tells how to customize list rendering. Maybe the same approach works with form rendering?

If not, then you can create your custom form type according to create custom field type documentation, and customizing the template.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!