Autocomplete is not working with dynamically added Inline forms

Issue #25 open
Tibor Tóth
created an issue

When you have inline forms such as TabularInline, autocomplete widget is not working with "added" rows.

In this case django uses a template row which is copied and appended dynamically to the form set on the client side and autocomplete jquery widget is not initialized for these rows.

I have attached sample models.py and admin.py files.

//Remarks: The admin class, which contains the inline from-set, does not have directly autocomplete fields, but it must be inherited from AutocompleteAdmin, otherwise AutocompleteAdmin's java script hack will not run and jquery.init.js will be loaded before jquery.ui.js.
There is another solution for this problem on http://www.lokkju.com/blog/archives/143 (I don’t know if it has any side effects.)//

Django version: 1.3

Comments (4)

  1. Log in to comment