I don't recall any other threads about this topic myself and couldn't see them from a search.
Unfortunately at this time Editor does not support the creation of optgroups directly through the ipOpts options.
What you would need to do is to modify the options directly yourself and then tell chosen to update from the select list.
You could do this using:
// Get the select element
var select = $('select', editor.field('myFieldName').node() );
.. add options to the list / manipulate the select list ...
// Tell Chosen to update
select.trigger('chosen:updated');
It is a little bit of a workaround, but I'm afraid that is really the only option at the moment (other than to modify the plug-in to support optgroups, which would be another option).
Answers
Search the forum, there are other posts for this including code example.
Unfortunately I couldn find mentioned posts, so I changes editor.chosen.js as follow :
please pay attention to ""priority_group"" for a sample data.
I don't recall any other threads about this topic myself and couldn't see them from a search.
Unfortunately at this time Editor does not support the creation of
optgroups
directly through theipOpts
options.What you would need to do is to modify the options directly yourself and then tell chosen to update from the select list.
You could do this using:
It is a little bit of a workaround, but I'm afraid that is really the only option at the moment (other than to modify the plug-in to support optgroups, which would be another option).
Regards,
Allan