Select2 Tagging issue.

Select2 Tagging issue.

kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 27Questions: 10Answers: 2

Hi Allan,

Sorry for troubling you so often.. but

I am trying to use Select2 plugin with Tagging enabled.

Although it works correctly, but I am facing 1 issue in editing

When i try and edit a record, the tags/selectoptions are not pre populated in the select box.. and when I try and update the data manually it shows all the tags as selectable options and not tags..

Kindly please help me with this.

you can find the entire JS here...



  • allanallan Posts: 44,048Questions: 1Answers: 5,833 Site admin


    Could you give me a link to the page that shows the issue so I can debug it with the live data please? I don't immediately see the issue, although if you could remove the initEdit event handler as well, that would be good, since it shouldn't be required.


  • kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 27Questions: 10Answers: 2

    hi Allan Please find the details

    website :
    Uname :
    Pwd : 12345678
    try editing the last row .. with field name as "Kapas-qr"
    the JS file path is
    the API response can be checked here
    The response has "select_options" as 
    select_options: [

    I can see the options as select options... but not as tags...

    kindly help me with debugging this.

  • kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 27Questions: 10Answers: 2

    1 more thing...
    I Want the tags to be passed to my api as CSV string but currently they are passed as array.. and vice versa as well.. from API currently I am returning an array but I Want it to be populated from a CSV string.

    I thing I might have to update the value in preCreate events... but cant seem to figure that out.

    Kindly help me..

  • kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 27Questions: 10Answers: 2


    when the select field is empty, the field is not included as a parameter to API Call.

    which is a problem for me..
    What I am looking for is ..

    1) Even if the field is blank. a blank parameter should be sent to the API
    2) if I select N options from dropdown, they should be sent to API as comma seperated string and not an array.
    3) When my API returns a Comma seperated string, it should properly populate the tags with the returned data..


Sign In or Register to comment.