Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3740

Setting checkbox via javascript/jQuery

$
0
0

Hi,
I'm using Editor in stand-alone mode and I've defined a checkbox thus:

{
 label: "test",
 name: "test",
 type: "checkbox",
 options: [
  { label: "one", value: 1}, { label: "two", value: 1}
 ]
}

I'm querying a database via jQuery and get an array back with the values [0, 1]. How do I set the relevant checkbox (label "two" in this case)?

Thanks in advance.
Regards,
Dave

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.


Viewing all articles
Browse latest Browse all 3740

Trending Articles