Datatables Editor posts and array for a checkbox
Datatables Editor posts and array for a checkbox

Hi,
I have an Editor form with a checkbox as follows:
{
'name':'send_mail',
'label':'Send Mail',
'data': 'send_mail', 'options':{"Yes":true},
'type':'checkbox',
}
When I attempt to add a new record, Editor submits the checkbox as an array,
data[0][send_mail][]: true
I am not using the Datatables PHP libraries, I am in fact using Laravel with the Yajra implementation.
I could put something in place to change the array to a simple variable on the server side, but I would prefer not to.
Is there a way I can persuade Editor to send a simple variable?
data[0][send_mail]: true
Thanks,
Will.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi Will,
The
checkbox
field type has aseparator
option which will basically join the array with the given character - e.g. to have a comma delimited list of values:Allan