Answer the question
In order to leave comments, you need to log in
How to use sonata admin formatter?
I want to use sonata formatter in the admin to edit the description field.
1) installed via composer
2) included in AppKernel
3) Added everything to the config
4) Then did additional actions according to here sonata-project.org/bundles/formatter/master/doc/re...
5) did install assets
As a result, in my builder
->add('description', 'sonata_formatter_type', array(
//'label' => 'Body',
'event_dispatcher' => $formMapper->getFormBuilder()->getEventDispatcher(),
'format_field' => 'description',
'source_field' => 'description',
'source_field_options' => array(
'attr' => array('class' => 'span10', 'rows' => 20)
),
'error_bubbling' => false
));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question