Selectize using getting error
Selectize using getting error
imy
Posts: 2Questions: 1Answers: 0
Using code below
fields: [{
label: "Vendor_Code:",
name: "PO_Requisition_Details.Vendor_Code",
type: 'selectize', options: optvalues,
}
and getting error below:
Uncaught Error adding field - unknown field type selectize
Please check if these plugin url are correct for use it.
<link href="//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.9.0/css/selectize.css" rel="stylesheet" type="text/css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.9.0/js/standalone/selectize.js"></script>
Thanks
Imy
QuickFlora
This discussion has been closed.
Answers
The clue is in the error message. There is no "selectize" field type.
https://editor.datatables.net/reference/field/
You've included the selectize source but have you included the plugin code that brings the selectize field type into Editor? It's all detailed here - https://editor.datatables.net/plug-ins/field-type/editor.selectize
thanks rduncecb,
I tried that page but it not allow to open this url
http://brianreavis.github.io/selectize.js/
Thanks
Imy
If you are using the two cloudfare urls above you do not need to visit the github url for the latest source (although it works for me so it must be a local issue for you). You need to create a .js file using the large chunk of displayed source code on https://editor.datatables.net/plug-ins/field-type/editor.selectize and load it along with the url's above (This is the plugin that allows editor to make use of selectize as a field type).