Select2 issues populating select
|Added at||2016-12-29 00:12|
This is my first try with select2 and I'm striking an issue which is probably something basic.
The select control code:
I'm using the following code to fetch data via a coldfusion function:
The raw JSON data returned from the call to the ajax URL is as follows:
The alert in the above code returns the following, essentially a comma-delimited list with no brackets or anything:
The issue is that the select is not populating with the returned data. I'm guessing it's something related to the format of the returned data.
Not sure if I've provided enough info, so let me know if you need anything else.
For any ColdFusion developer who may have an idea, the following is the ColdFusion template being called via the ajax url. I realise I could make a call directly to the CFC without an intermediary template: