Datatable Editor Checkbox
Datatable Editor Checkbox
lrabbit
Posts: 12Questions: 1Answers: 0
Hello,
Am trying to use a checkbox in Datatables Editor to represent a column in my datatable.
The column is a string that is either "True" or "False".
I have set up a checkbox field to represent that column
[code]
{
"type": "checkbox",
"label": "By Email",
"default": "true",
"name": "ByEmail",
"ipOpts": [
{
"label": "",
"value": "True"
}
]
}
[/code]
The checkbox state shows correctly when I first edit a record, but does not "uncheck" ever,
so if I edit another record, the checkbox will be checked regardless of the underlying data.
I am sure I have missed something obvious and am probably doing something stupid :-)
Any pointers greatly appreciated.
Cheers,
Paul.
Am trying to use a checkbox in Datatables Editor to represent a column in my datatable.
The column is a string that is either "True" or "False".
I have set up a checkbox field to represent that column
[code]
{
"type": "checkbox",
"label": "By Email",
"default": "true",
"name": "ByEmail",
"ipOpts": [
{
"label": "",
"value": "True"
}
]
}
[/code]
The checkbox state shows correctly when I first edit a record, but does not "uncheck" ever,
so if I edit another record, the checkbox will be checked regardless of the underlying data.
I am sure I have missed something obvious and am probably doing something stupid :-)
Any pointers greatly appreciated.
Cheers,
Paul.
This discussion has been closed.
Replies
Odd one! Can you link me to the page so I can take a look to see what is going on please? Off the top of my head the only thing would be that the database isn't overwriting the state if the item is not checked - but that should be happening with my default classes (are you using them?).
Thanks,
Allan
Thanks for the reply. I'll cut away all the rubbish on my page to the bare essentials and put it up online.
It does seem odd :-)
Cheers,
Paul.