0

I have a form generated with the sonata admin bundle. I want to enable a live search tip for my user on an input field. The proposition should come from a category table in the DB.

For example, if I have a field called company, when a user writes "a", I should suggest all companies whose name contains "a".

Nicolai Fröhlich
  • 51,330
  • 11
  • 126
  • 130
lemahdois
  • 77
  • 3
  • 11
  • Take a look at the detailed answer here: http://stackoverflow.com/questions/10118868/how-to-use-ajax-within-sonata-admin-forms – caponica Feb 07 '14 at 09:57

1 Answers1

0

Use JQuery Autocomplete. On server side create controller action that will return suggestions through AJAX. See example - http://jqueryui.com/autocomplete/#remote-jsonp

dmnptr
  • 4,258
  • 1
  • 20
  • 19