ioalessio/IoFormBundle — Issue #8: Trouble with autocomplete
Author: mvdpoel
Created: 2011-10-31 08:53:41+00:00
State: open

Hey there!

Thanks for this bundle! The datepicker worked just as i espected, the autocomplete didn't :)

I got it to render, but it renders a hidden form field and it doesn't seem to output the needed javascript which adds the event.

Would it be possible to see a complete working example? somewhere?

$oForm = $this->createFormBuilder()
->add('emailaddress',
'jquery_entity_autocomplete',
array(
'class' => 'PntToolBundle:User',
'property' => 'id',
'url' => $this->generateUrl('search_email',
array(
'search' => '$$term$$',
'_format' => 'json'
)
),
'callback' => ''
)
)
->getForm();

// skipped some code
return $this->render('bundle:template', array('form' => $oForm->createView()))

// in template :
{{ form_widget(form) }}

Thank you for your help!

Kind regards