insert another autocomplete script in "edit"

Questionsinsert another autocomplete script in "edit"
Igor asked 8 years ago

Hello,
I need add function autocomplete from "https://www.devbridge.com/sourcery/components/jquery-autocomplete/" to edit input.
When I enter values in the input field when editing an entry, I need to call the code:
$('#auotocomplete1').autocomplete({
serviceUrl: 'http://xx.xx.xx.xx/query/1.php',
paramName: 'name',
delimiter: /(,|;)s*/,
});

JSLib including
<script src="js/jquery.autocomplete.js" type="text/javascript"></script>

1 Answers
Abu Ghufran answered 8 years ago

You can connect this function like select2 integration in this demos/integration/dropdown-select2.php.

$col["editoptions"]["dataInit"] = "function(){ setTimeout(function(){ link_autocomplete('{$col["name"]}'); },200); }";

and in html:

<script>
function link_autoccomplete(id)
{
….. // your code
}
</script>

Your Answer

17 + 9 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?