Hi all,
I am facing a problem regarding getting the value of a jqxInput with multiple values.
I tried using:
$('#inputDiv').val()
,
$('#inputDiv').jqxInput('val')
and (due to the fact, that the data is also stored in the data value of the html element) I also tried
$('#inputDiv').val().value
.
Unfortunately none of my attempts receives the whole data of the input – I only receive the last entered value.
Here is my code:
$("#auftragsgrund").jqxInput({
height: 25, width: 250, displayMember: "CostCenterNumber", valueMember: "CostCenterNumber", source: function (query, response) {
var item = query.split(/,\s*/).pop();
// update the search query.
$("#auftragsgrund").jqxInput({ query: item });
response(costCenterNumbers);
},
renderer: function (itemValue, inputValue) {
var terms = inputValue.split(/,\s*/);
// remove the current input
terms.pop();
// add the selected item
terms.push(itemValue);
// add placeholder to get the comma-and-space at the end
terms.push("");
var value = terms.join(", ");
return value;
}
})
This input should auto-complete the values based on a list (this works) and the user should be able to enter multiple values comma seperated.
Could you help me?
Best regards