User Tools

Site Tools


Plugin installed incorrectly. Rename plugin directory 'swiftmail.backup' to 'swiftmail'.
en:software:tim:smartform:autocomplete

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:software:tim:smartform:autocomplete [2018/04/18 10:47]
Julian Le
en:software:tim:smartform:autocomplete [2021/07/01 09:52] (current)
Line 66: Line 66:
 === Autocomplete with CSV file as source === === Autocomplete with CSV file as source ===
  
-The suggestions for the autocomplete can of course be more complexe and include more information. Therefor the autocomplete has to be passed a text file. For this example we are using a example file with personnel data. It contains first name, surname, email and phonenumber in the columns of the CSV. The file is located in this exmaple in the custom folder. Firstly the file has to be called and a object has to be created from the content. This happens via AJAX request. The file's content will be split on ever linebreak and then on ever semicolon. Now an object "​employee"​ with data from the text file is generated. The object is then passed on to the autocomplete as a source. If an option is selected, first name, surname, email and phonenumber are displayed in a popup. If the text file cannot be loaded, an error message is shown.+The suggestions for the autocomplete can of course be more complexe and include more information. Therefor the autocomplete has to be passed a text file. For this example we are using a example file with personnel data. It contains first name, last name, email and phonenumber in the columns of the CSV. The file is located in this exmaple in the custom folder. Firstly the file has to be called and a object has to be created from the content. This happens via AJAX request. The file's content will be split on ever linebreak and then on ever semicolon. Now an object "​employee"​ with data from the text file is generated. The object is then passed on to the autocomplete as a source. If an option is selected, first name, last name, email and phonenumber are displayed in a popup. If the text file cannot be loaded, an error message is shown.
  
 <code javascript>​ <code javascript>​
Line 86: Line 86:
                 };                 };
             }             }
-            jq( "#ID_DES_INPUTFELDES" ).autocomplete({+            jq( "#ID_OF_FIELD" ).autocomplete({
                 source: employees,                 source: employees,
                 minLength: 0,                 minLength: 0,
en/software/tim/smartform/autocomplete.1524041234.txt.gz · Last modified: 2021/07/01 09:54 (external edit)