<script type="text/javascript"> $(function(){ $('input#id_entry').autocomplete({ appendTo: "#add-table-elem-dialog", source: function(req, add){ $.getJSON(ajax_entry_lookup, req, function(data) { var suggestions = []; $.each(data['result'], function(i, val){ suggestions.push(val[0]); }); add(suggestions); }); }, }); }); </script> <div id="assign-phraseologic-frames"> <table id="entries-with-phraseologic-frame" class="AspectRelationsTable"> <ul> {% for entry in entries %} <li>- {{ entry.name }} {{ entry.pos }}</li> {% endfor %} </ul> </table> <form class="assign-phraseologic-frame-form" method="post"> {% csrf_token %} {{ form.as_p }} <p class="lexeme-save"> <button type="submit" id="assign-phraseologic-frame-form-submit"> Dodaj </button> <button type="reset" id="assign-phraseologic-frame-form-cancel"> Zamknij </button> </p> </form> </div>