How load data via ajax and select by id on initialization/on demand?

48 views
Skip to first unread message

leoc...@gmail.com

unread,
Jun 16, 2016, 3:53:38 AM6/16/16
to select2
Hi,

I am using select2 successfully for some selects that are not related.

Now I try to replace some selects that are dependent on each other. At least in one direction. The page is loaded with 3 parameters which represent the ids of preselected values of Group1 => Subgroup2 => Subgroup3.

How do I load the ajax tags data on init or programmatically and select by respective group?

Also how would I load the ajax data and automatically select the only option if there is only one?

I'd be thankful for any hint :-)

Reply all
Reply to author
Forward
0 new messages