DataTables Editor Number Input POSTS String instead of Number in JSON Payload.
DataTables Editor Number Input POSTS String instead of Number in JSON Payload.
washuit-iamm
Posts: 133Questions: 55Answers: 2
in Editor
Take the following field definition as an example:
{
"name": "TotalDisk",
"label": "Total Disk (Gb)",
"className": "block",
"attr": {
"type": "number",
"step": "0.01",
"autocomplete": "off"
}
},
When the Editor POSTS this as JSON to the endpoint, the data is in the form of a string: { "TotalDisk": "123" }
The data should be a number. IE: instead of { "TotalDisk": 123 }
Is there a way to achieve this without messing with the ajax settings when constructing an Editor?
This discussion has been closed.
Answers
I've added a reply to your question about that here.
Allan