ux autocomplete

Description


Parameters

string

The control's ID

string

The URL to fetch the data (the value of the filter must be *q* this function will replace it later by the current value)

object

JSON object with the options to create the auto-completion component:

ondraw

Function with the value of the current field and you must return the HTML to draw this cell

Return

void


Example


// Create the container       
document.getElementById("ux-autocomplete-example01").innerHTML = 

  ui.input( "ItemCode", "ux-autocomplete-cexample01", "", {

    placeholder:"Type an ItemCode or Name", 

    licon:"fa-search" } );
ux.autocomplete('ux-autocomplete-cexample01', 

   '?program_id='+appInfo.gid+'&page=t20_demo&get=dgrid02&q=*q*');

 

Preview: (Try to type some "ItemCode" or "ItemName" existing in your database)

In the preview of the example you can see the result of the string:
Start typing an ItemCode or ItemName from your existing database, and a list containing the data will be prompted as below:

 

UX_autocomplete