Skip to content

Instantly share code, notes, and snippets.

Created April 10, 2016 15:37
Show Gist options
  • Select an option

  • Save anonymous/0bde1fa67c0d6b7f59dd7327a555466f to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/0bde1fa67c0d6b7f59dd7327a555466f to your computer and use it in GitHub Desktop.
A saved configuration for a schema form example, http://textalk.github.io/angular-schema-form/examples/bootstrap-example.html
[
{
"type": "help",
"helpvalue": "<h4>Tabbed Array Example</h4><p>Tab arrays can have tabs to the left, top or right.</p>"
},
{
"key": "comments",
"type": "tabarray",
"add": "New",
"remove": "Delete",
"style": {
"remove": "btn-danger"
},
"title": "{{ value.name || 'Tab '+$index }}",
"items": [
"comments[].name",
"comments[].email",
{
"key": "comments[].comment",
"type": "textarea"
}
]
},
{
"type": "submit",
"style": "btn-default",
"title": "OK"
}
]
{
"comments": [
{},
{},
{
"comment": "c1"
}
]
}
{
"type": "object",
"title": "Comment",
"properties": {
"comments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"email": {
"title": "Email",
"type": "string",
"pattern": "^\\S+@\\S+$",
"description": "Email will be used for evil."
},
"comment": {
"title": "Comment",
"type": "string",
"maxLength": 20,
"validationMessage": "Don't be greedy!"
}
},
"required": [
"name",
"email",
"comment"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment