I have a form with an EntityType field. The table from which the values ββwere taken has grown, and the selection window that is displayed makes the page large (= slow loading).
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 display an empty selectbox, and on the interface side I use AJAX to populate and autocomplete selectbox.
The problem is that now when I submit the form, it is not valid. Any ideas?
strum source share