This commit is contained in:
2019-12-10 01:13:01 +00:00
parent 2ea738d42d
commit d58f3f20a9

View File

@@ -234,6 +234,17 @@ export default {
}
}
//OK, this is failing because the template portion needs it's quote to be escaped with backslashes, i.e. this works:
/* {"concurrencyToken": 3802346,
"formKey": "user",
"template": "[{\"fld\":\"UserCustom1\",\"hide\":false,\"required\":true,\"type\":\"text\"},{\"fld\":\"UserNotes\",\"required\":true},{\"fld\":\"UserCustom2\",\"hide\":true,\"required\":false,\"type\":\"bool\"}]"}
*/
so what is required is instead of building a true array into newObj.template, instead build it aside then attach it as a string to the newObj.template value
//Maybe there's a json method that will turn the array of objects into an escaped string properly.
/* example
{"data":{"id":1,"concurrencyToken":3798757,"formKey":"widget","template":"[
{\"fld\":\"WidgetNotes\",\"required\":true},