I have a Form with an EntityType field. The table from which the values are taken has grown, and the select box that is rendered makes the page to big (=slow to load).
I replaced this:
->add(
'contact',
'entity',
array(
'class' => 'CRMCoreBundle:Contact',
'required' => false,
'empty_data' => null,
)
)
with:
->add(
'contact',
'entity',
array(
'class' => 'CRMCoreBundle:Contact',
'choices' => array(),
'required' => false,
'empty_data' => null,
)
)
to render an empty selectbox, and on the frontend side I use AJAX to populate and autocomplete the selectbox.
The problem is that now when I submit the form, it is not valid. Any ideas?