membuat input selection menjadi auto complete
setAutoComplete($bool_or_array_or_string = true, $parent_field_sql='');
$array_config = array( 'onfind' => "function(a){if(a==null)return alert('No match!');if(!!a.extra){$('#test_onfind_ac').val(a.extra[0]);$('#test_onfind').val(a.extra[1]);alert('I execute special function!! AND Unbind content tags suggestion');$('#tag_id').autocomplete('clear');}else{var b=a.selectValue;}}", 'onselect' => "null", 'formatItem' => "function(a){return a[2]}", 'url' => _URL."user/selecttable", // BISA DIGANTI KE URL YG DIINGINKAN 'data' => "function(){return {}};", 'inputClass' => "ac_input", 'resultsClass' => "ac_results", 'loadingClass' => "ac_loading", 'lineSeparator' => " ", 'cellSeparator' => "|", 'minChars' => "2", 'delay' => "10", 'matchCase' => "0", 'matchSubset' => "1", 'matchContains' => "1", 'cacheLength' => "10", 'mustMatch' => "0", 'extraParams' => "function(){return {}};", 'selectFirst' => "true", 'selectOnly' => "false", 'maxItemsToShow' => "-1", 'autoFill' => "false" );Sehingga untuk menggunakan anda tinggal mengisikan yang ingin anda ubah, semisal:
...->setAutoComplete(array('minChars'=>3)); atau ...->setAutoComplete(array('url' => $Bbc->mod['circuit'].'.'.$Bbc->mod['task']));
File Path: includes/lib/pea/form/FormSelect.php membuat input field yang berupa option selection dimana opsi nya ditentukan sendiri secara manual baik berupa Array maupun satu2. Jika anda ingin menggunakan table database untuk menentukan opsi maka anda bisa menggunakan FormSelecttable
0 Comment
Post Your Comment