Checkbox withing cell without using a join table
Checkbox withing cell without using a join table
Link to test case:
Hello I want to do something simliar to this below, where we have a cell that has a checkbox of values.
https://editor.datatables.net/examples/advanced/joinArray.html
However, instead of a one to many table join. We want to pass in a string such as:
"STAT|RUSH|NORMAL|LOW", explode that into an array, then json encode it to be used as the checkbox values.
Is there another example of how to build a checkbox into a cell without using the joined table?
This question has an accepted answers - jump to answer
Answers
Hi,
I don't think we do actually have an example of that, however, what you want is the
separator
option of thecheckbox
field - e.g. in this case:Then it will expect a string in the data for that field and return a string, delimited by a pipe.
Regards,
Allan
@allan
I tried doing it this way:
{
"label": "Task Flags",
"name": "task.taskFlags", // the database.column of where it will be stored?
"type": "checkbox",
"separator": "|",
"ipOpts": [
[
"STAT|RUSH|NORMAL|LOW"
]
]
}
But it did not work, where do I pass along the string delimited by the pipe line?
Nvm I got it to work now:
I'll need to figure out the inline editing next, currently it only shows a checkbox without the labels next to them if you double cick into the cell to try to select a checkbox.