This topic contains 4 replies, has 4 voices, and was last updated by  Hristo 2 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • jqxInput autocomplete multiselect #81454



    I am trying to use jqxInput autocomplete multiselect feature. My data list has id and name. I have written the following code snippet:

    $scope.contactlistData= [{‘id’:1, ‘name’:’Nidhi’},
    {‘id’:2, ‘name’:’Raj’}]
    datatype: “json”,
    datafields: [
    { name: ‘id’, type: ‘integer’ },
    { name: ‘name’, type: ‘string’ },

    height: 25, width: 250,
    source: function (query, response) {
    var item = query.split(/,\s*/).pop();
    $(“#Contact”).jqxInput({query: item});
    renderer: function (itemValue, inputValue) {
    var terms = inputValue.split(/,\s*/);
    var value = terms.join(“, “);
    return value;
    }, displayMember: ‘name’,
    valueMember: ‘id’

    html code:
    <input type=”text” id=”Contact” class=”form-control” ng-model=”contactval”
    ng-minlength=”3″ ng-maxlength=”255″/>

    This is working fine on the UI but I am unable to fetch the values selected by user in the input box.
    I have tried using :
    and $scope.contactval

    I get value of only the last element selected in the input and not all the value selected.
    Kindly suggest.

    jqxInput autocomplete multiselect #81463


    Hi Nidhi,

    jqxInput have own val method.
    To get values with it you can use code similar to:
    var values = $("#input").jqxInput("val");
    It will return the correct values.

    Here is a demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team

    jqxInput autocomplete multiselect #81517


    Thanks for the reply. Although the jsfiddle works, but on my code only last object in the input box is coming in the value, not sure what I am missing

    Also, I tried using other solution provided in following link:
    This gives me all the names selected and not the entire object of the selected items.

    For now as a work around On select I am pushing each item selected to an array. This works as far as getting values are concerned, but it will not work correctly if after selecting a value in autocomplete the value is altered or removed. Do let me know if u can suggest some better solution.

    jqxInput autocomplete multiselect #99578


    I’m having the same issue as Nidhi. The demo does work, but my code still returns only the last item as an object. Was a solution ever found to this?

    jqxInput autocomplete multiselect #99609


    Hello natg504,

    There has a solution provided by my colleague on this topic:
    His solution is this.
    Could you clarify it? Please, provide us a simple example of your case in or

    Best Regards,
    Hristo Hristov

    jQWidgets team

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.