symfony2admingenerator / AvocodeFormExtensionsBundle

(old-legacy) Symfony2 form extensions for Admingenerator project (also working standalone!)
Other
48 stars 31 forks source link

Example of using autocomplete extension with AdmingeneratorBundle #133

Closed mirza99 closed 9 years ago

mirza99 commented 9 years ago

Hi, I'm doing the same thing like in this issue : https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle/issues/509

@loostro : You created an autocomplete extension but I didn't found documentation about using it in the AdmingeneratorBundle

ioleo commented 9 years ago

The autocomplete extension is just to add autocomplete="off" to input (which disables BROWSER autocomplete).

You probably was to use Select2 widget (which is a select + "search" mechanism). See select2 doc.

If you want a list of entities -> use afe_select2_entity, if a simple array of choices -> use afe_select2_choice... ETC.

All the options passed into config option are passed down to the widget (and thanks to e4js filter, you can pass anonymous javascript functions too).

See select2 doc to see all possible options.

ndoulgeridis commented 9 years ago

Is there already an Ajax autocomplete widget type as I haven't found one.

ksn135 commented 9 years ago

https://gist.github.com/ksn135/447dfbf674f16b1e8e94

Отправлено с iPhone