In my Admin I'v defined this:
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
/* ... */
->add('camps', 'sonata_type_model', array(
'btn_add' => false, //Specify a custom label
'choices' => $this->tema_service->getCampsDefinicio($this->getSubject()),
'sortable' => true,
'multiple' => true,
), array(
'placeholder' => 'No selected'
))
;
/* ... */
}
Function getCampsDefinicio returns an array of items ordered. Inspite of it, the options appear sorted according its id.
What can I do to get it respect the order given?
It does not care if I have to override any template. In that case which files I have to look for/override?