I’m very confused . The combo component has allowFreeText(state) method . Dcoumentation say
But I can always write in the combo field, eg in dhtmlx.com/docs/products/dhtmlx … _form.html
In my code if I use var cateIntcombo=form_i.getCombo("form_combo_4");
cateIntcombo.allowFreeText(false);
this does not work.
I do not understand if I’m wrong or if there is a malfunction.
It seems to me that the previous behavior (old version) was different.
If the user types something in the combo box the function allowfreeText set the use on that value true or false.
For example,
Is the user types Blablabla in the box but that is not an option then you can deside if “blablabla” chould be considerred as an exepted value.
I think that can be used to for example let the user add some more options to a combo list.
this is a html page that will show you the difference.
place it in the folder \samples\dhtmlxCombo\01_init
The Page is modified from the existing combo init sample
You can always type in the combo box the difference is what is send to the server.
Type some random text in the combo box and then click somewhere outside the combo box.
A popup will show what you have typed.
Change the myCombo.allowFreeText(true); to myCombo.allowFreeText(false);
Type some random text in the combo box and then click somewhere outside the combo box.
A popup will show what is selected by default.
So if the text is typed inside the box is NOT one of the options it will disregard what the user has typed.
I do notice one “problem” and that is when the user clears the text. it will return an empty string.
Maby that is a bug or not. I dont know.
Hope this explains a bit beter test.zip (606 Bytes)
If I comment this line, I see that the default mode is true and not false as written on the documentation.
This behavior forces you to set up any combo in the form .
I do notice that there are alot of problems with the documentation.
I recently had some problems with validations on a combobox. Turns out I had to take the example from grid to get the validation working on a combo.
I’m working in the IT sector also and I know it’s important to keep the documentation up to date but I also realize that is a massive work.
Sometimes you have to decide if documentation is more important then fixing bugs.
So here comes the forum
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan