Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by rubendn on Nov 30, 2009 18:59
open dhtmlx forum
dhtmlxCombo Minimum Characters

Is there a way on the combobox to set a minimum number of characters that are entered before it calls for the XML?
I'm using autocomplete mode where it is calling a file with the options for the combobox.
Answer posted by Alex (support) on Dec 01, 2009 01:44

Combo API doesn't provide this functionality. You can modify the dhtmlxcombo.js as follows:

locate the filterSelf method and replace the highlighted line: 

dhtmlXCombo.prototype.filterSelf = function(mode)

  {
  var text=this.getComboText();

  if (this._xml){

with this one:

  if (this._xml && (text.length >= MINIMUM_NUMBER)){

Where MINIMUM_NUMBER is the necessary number of characters.