Hi, Need help please - I have to get the filtering to work & not allow incorrect input!
The DhtmlxCombo Filtering mode is great but the readonly protected for incorrect value.
How do I not allow for incorrect value to be allowed.
eg. Filter option values are 1 & 2
when filter 3 in input box it allows to keep the value, meaning user can insert incorrect value!
I want the filter but do not want the user to insert any value that is invalid in the drop list!
The drop down should not allow it - maybe when leave check’s if correct value!
Please help!
meaning user can insert incorrect value!
It may be useful in some use-cases, so can’t be counted as incorrect behavior.
>>The drop down should not allow it - maybe when leave check’s if correct value!
by adding next code, you will add check , which will block incorrect input in combo
combo.attachEvent(“onKeyPressed”,function(){
var val=combo.getComboText();
val=val.substr(0,val.length-1);
window.setTimeout(function(){
if (!combo.filterAny){
combo.setComboText(val);
combo.filterSelf();
}
},1);
})
(Apologies I think I replied by submiting a new question)
Hi, Thanks a million for the assistance.
When I add the code to the dhtmlxcombo.js file then my dhtmlcombos don’t appear on my page. It’s all missing.
combo.attachEvent(“onKeyPressed”,function(){
var val=combo.getComboText();
val=val.substr(0,val.length-1);
window.setTimeout(function(){
if (!combo.filterAny){
combo.setComboText(val);
combo.filterSelf();
}
},1);
})
2. Secondly on the filtering, when I filter an a value and is returned to the input box - Then I can’t use the drop down.
It is like the dropdown list is disabled, i have to clear the filter selection then only will the ldrop list be available.
Please Help, Regards