Wrote autocompletion for foreign key field
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="dropdown">
|
||||
<input autocomplete="off" id="{{widget.attrs.id}}" data-ac-url="{{custom.search_url}}" data-bs-toggle="dropdown" type="text" placeholder="Search..." class="{{widget.attrs.class}}">
|
||||
<input autocomplete="off" id="{{widget.attrs.id}}" data-ac-url="{{custom.search_url}}" data-ac-name-field="{{custom.name_field_name}}" {% if custom.image_field_name %}data-ac-image-field="{{custom.image_field_name}}"{% endif %} data-bs-toggle="dropdown" type="text" placeholder="Search..." class="{{widget.attrs.class}}">
|
||||
<ul id="{{widget.attrs.id}}-ac-ul" class="dropdown-menu">
|
||||
</ul>
|
||||
<div class="d-flex align-items-center mt-3 mb-3" id="{{widget.attrs.id}}-dflex-container">
|
||||
@@ -17,7 +17,7 @@
|
||||
{% endif %}
|
||||
<div class="ms-3">
|
||||
{% if custom.current_instance %}
|
||||
{{custom.current_instance}}
|
||||
{{custom.name}}
|
||||
{% else %}
|
||||
<span class="text-secondary">None selected</span>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user