Procházet zdrojové kódy

Introduction of a new form type "select-input" using input and datalist elements which should allow to specify any custom value in addition to the available options. Unfortunately the styling options for datalist elements are almost non-existent.

Steven Günther před 4 roky
rodič
revize
15e98dda83
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      js/functions.js

+ 3 - 0
js/functions.js

@@ -1217,6 +1217,9 @@ function buildFormItem(item){
 	`;
 	//+tof(item.value,'c')+`
 	switch (item.type) {
+        case 'select-input':
+            return smallLabel + '<input list="'+item.name+'Options" data-changed="false" lang="en" type="text" class="form-control' + extraClass + '"' + placeholder + value + id + name + disabled + type + label + attr + ' autocomplete="new-password" /><datalist id="'+item.name+'Options">' + selectOptions(item.options, item.value) + '</datalist>';
+            break;
 		case 'input':
 		case 'text':
 			return smallLabel+'<input data-changed="false" lang="en" type="text" class="form-control'+extraClass+'"'+placeholder+value+id+name+disabled+type+label+attr+' autocomplete="new-password" />';