The Smartforms Autocomplete Input Control is one of the new controls introduced in K2 SmartForms v4.6.9. It is very similar to both the picker and dropdown controls but with it’s own unique aspects.
K2 Automated Testing Software
BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.
K2 SmartForm Views – Autocomplete Input Control – 1
The K2 SmartForms Autocomplete Input Control’s data source is set up exactly the same way the as that of the picker and dropdown controls.
K2 SmartForm Views – Autocomplete Input Control – 2
You can load additional data based on which item the user selects by setting up a rule for the autocomplete control’s on-change event.
K2 SmartForm Views – Autocomplete Input Control – 3
The returning data can then be mapped from these return properties.
K2 SmartForm Views – Autocomplete Input Control – 4
A very nice feature made possible by the autocomplete control is that it allows you to cater for both editing and creating data. With a dropdown list and picker you are limited to what is available through the data source and to add new data you have to implement some additional rules and controls.
.
K2 SmartForm Views – Autocomplete Input Control – 5
Now we are able to pass through a value to automatically select an item from the data source in the autocomplete control, but we are also able to search manually for another entry or enter text and use it to create a new data entry if the autocomplete control cannot resolve it from existing data.
K2 SmartForm Views – Autocomplete Input Control – 6
To access the text entered in the autocomplete control you map the Text field in the Details section of the control.
K2 SmartForm Views – Autocomplete Input Control – 7
When you run your form you will see as soon as you start typing a list with all possible results appear, the list gets updated every time you change the input text.
K2 SmartForm Views – Autocomplete Input Control – 8
When you select an item from the results the related data will be populated as specified in your on-change rule.