- Notifications
You must be signed in to change notification settings - Fork 641
Closed
Description
Hello!
I try add checkbox to form
{ "key": "modules.bindadm", "type": "checkbox", "value": "dsadsa", "title": "Будет установлен модуль управления почтовым сервером" }
and take error Error: undefined is not an object (evaluating 'obj.schema['default'])'
I inspect source code, and find this section:
if (obj.type === 'checkbox' && angular.isUndefined(obj.schema['default'])) { obj.schema['default'] = false; }
You try determinate obj.schema['default']
, but obj
not have property schema
:
[Log] Object (schema-form.js, line 1463) key: Array[2] title: "Будет установлен модуль управления почтовым сервером" type: "checkbox" value: "dsadsa" __proto__: Object
My js skill very low) but i try change you code like:
if (obj.type === 'checkbox' && angular.isUndefined(obj.schema)) { obj.schema = ['default']; obj.schema['default'] = false; }
This code work, but i don't know, may be its bad solution.
And i have answer question. Can i add value to checkbox. In default, checkbox can be true
or false
, but i need, add string value, like 'some string', its possible?
P.S.: Sorry my low english skill.
Regards.