I am using the following code to change the combobox into a normal input field when adding a new record.
$('.fkey').combobox({
hasDownArrow:false,
onShowPanel:function(){
$(this).combobox('hidePanel');
}
});
The code does remove the dropdown and prevents the panel from showing, however when I save the form the value of the element is null even if a value is entered into the input field.
It appears that <input type="hidden" class="combo-value" name="XX" value=""> is added to the DOM multiple times.
When the first char is entered
- there is 1 occurrence of the combo-value element, when the second char is entered [xx] the combo-value disappears, on the 3rd char [xxx] the combo-value input is duplicated, and any chars entered after the 3rd char [xxxx], the combo-value element disappears.
I have also noticed, that the onChange() event gets fired twice when entering text using this method, but only gets fired once when the combobox is selected normally.