How do you set the placeholder when using chosen js plugin
How do you set the placeholder when using chosen js plugin
ethics.systems
Posts: 4Questions: 2Answers: 0
The default placeholder doesn't seem to work when using chosen js plugin. I tried using data-placeholder but that breaks. When using just placeholder it just keeps coming up with the default selection, "select an option".
fields: [
{
"label": "Select A Vendor:",
"name": "vendor_select",
"type": "chosen",
"options": {
placeholder: "Select A Vendor"
}
}
]
This discussion has been closed.
Answers
Just figured out how to set it on a somewhat global level, but still private to the datatables. Modify editor.chosen.js in the set function. I'm sure there is a way to do it from the javascript on the page, but so far this works for me.
The chosen documentation doesn't list
placeholder
as an option. Possibly you need to useplaceholder_text_single
which is does document.Allan