Four Js Development Tools Forum

General => Ask Reuben => Topic started by: Reuben B. on May 11, 2020, 07:50:59 am



Title: Ask Reuben 20 - Autocompletion
Post by: Reuben B. on May 11, 2020, 07:50:59 am
Type a phrase into a Google search field and you will see a list of potential search phrases from which you can select a phrase.  This list changes the more you type to reflect what you have typed so far.  By selecting a value from the list you don’t have to type in the full value. This is known as autocompletion. 

As well as the Google search field which is probably the most well known example, you may also have seen the same design pattern in other data entry fields in other applications.  A common example is address fields, you start typing the address, and the application offers you a list of valid addresses that match what you have typed, and most importantly the address is in the correct format set by the local postal organisation.

Within Genero you can achieve the same user interface pattern for a field.  It requires adding the COMPLETER attribute to an EDIT or BUTTONEDIT widget, and then in the ON CHANGE trigger add code to populate the list that appears using the ui.Dialog.setCompleterItems() method to populate the list.

Using autocompletion in a Genero application, you not only improve the speed of data input but also improve the quality of data input by helping the user enter a valid formatted value.

Read more at https://4js.com/ask-reuben/ig-20/