Skip to content

Instantly share code, notes, and snippets.

@nmorse
Last active August 29, 2015 14:11
Show Gist options
  • Save nmorse/d11160d9d2380d41027b to your computer and use it in GitHub Desktop.
Save nmorse/d11160d9d2380d41027b to your computer and use it in GitHub Desktop.
angular-schema-form_proj
[
{
"type": "help",
"helpvalue": "<h4>Tabbed Array Example</h4><p>Tab arrays can have tabs to the left, top or right.</p>"
},
{
"key": "fe",
"type": "tabarray",
"add": "New",
"remove": "Delete",
"style": {
"remove": "btn-danger"
},
"title": "value.name || 'Tab '+$index",
"items": [
"fe[].name",
{
"key": "fe[].comment",
"type": "textarea"
},
{
"key": "fe[].fe",
"type": "tabarray",
"add": "New",
"remove": "Delete",
"style": {
"remove": "btn-danger"
},
"title": "value.name || 'Tab '+$index",
"items": [
"fe[].fe[].name",
{
"key": "fe[].fe[].comment",
"type": "textarea"
}
]
}
]
},
{
"type": "submit",
"style": "btn-default",
"title": "OK"
}
]
{
"type": "object",
"title": "fe",
"properties": {
"fe": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"fe": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"comment": {
"title": "Comment",
"type": "string",
"maxLength": 20,
"validationMessage": "Don't be greedy!"
}
}
}
},
"comment": {
"title": "Comment",
"type": "string",
"maxLength": 20,
"validationMessage": "Don't be greedy!"
}
},
"required": [
"name",
"comment"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment