Skip to content

Instantly share code, notes, and snippets.

@marjoballabani
Created March 9, 2016 13:58
Show Gist options
  • Save marjoballabani/f1eac4aed0b9e21faa19 to your computer and use it in GitHub Desktop.
Save marjoballabani/f1eac4aed0b9e21faa19 to your computer and use it in GitHub Desktop.
Output form
{
"schema": {
"type": "object",
"properties": {
"lrll1eiet_k7": {
"type": "object",
"title": "First section",
"key": "lrll1eiet_k7",
"properties": {
"h4pqdr7vwnwm": {
"type": "string",
"title": "Text input 1",
"required": true,
"pattern": "^\\S+@\\S+$",
"validationMessage": "Email not valid"
}
}
},
"jlza95xdocki": {
"type": "object",
"title": "Section 2",
"key": "jlza95xdocki",
"properties": {
"c2q09u4&2pwh": {
"type": "string",
"title": "Date 1",
"format": "date",
"required": true
},
"b3xqne_cyjdu": {
"type": "string",
"title": "Select 1",
"enum": [
"First option",
"Second option"
]
}
}
}
}
},
"form": [
{
"key": [
"lrll1eiet_k7"
],
"htmlClass": "psection pkey_lrll1eiet_k7",
"items": [
{
"key": [
"lrll1eiet_k7",
"h4pqdr7vwnwm"
],
"htmlClass": "pfield pkey_h4pqdr7vwnwm",
"type": "text",
"title": "Text input 1",
"required": true,
"validationMessage": "Email not valid",
"schema": {
"type": "string",
"title": "Text input 1",
"required": true,
"pattern": "^\\S+@\\S+$",
"validationMessage": "Email not valid"
},
"ngModelOptions": {}
}
],
"title": "First section",
"schema": {
"type": "object",
"title": "First section",
"key": "lrll1eiet_k7",
"properties": {
"h4pqdr7vwnwm": {
"type": "string",
"title": "Text input 1",
"required": true,
"pattern": "^\\S+@\\S+$",
"validationMessage": "Email not valid"
}
}
},
"ngModelOptions": {},
"type": "fieldset"
},
{
"key": [
"jlza95xdocki"
],
"htmlClass": "psection pkey_jlza95xdocki",
"items": [
{
"key": [
"jlza95xdocki",
"c2q09u4&2pwh"
],
"htmlClass": "pfield pkey_c2q09u4&2pwh",
"type": "datepicker",
"title": "Date 1",
"required": true,
"schema": {
"type": "string",
"title": "Date 1",
"format": "date",
"required": true
},
"ngModelOptions": {}
},
{
"key": [
"jlza95xdocki",
"b3xqne_cyjdu"
],
"htmlClass": "pfield pkey_b3xqne_cyjdu",
"type": "select",
"title": "Select 1",
"schema": {
"type": "string",
"title": "Select 1",
"enum": [
"First option",
"Second option"
]
},
"ngModelOptions": {},
"titleMap": [
{
"name": "First option",
"value": "First option"
},
{
"name": "Second option",
"value": "Second option"
}
]
}
],
"title": "Section 2",
"schema": {
"type": "object",
"title": "Section 2",
"key": "jlza95xdocki",
"properties": {
"c2q09u4&2pwh": {
"type": "string",
"title": "Date 1",
"format": "date",
"required": true
},
"b3xqne_cyjdu": {
"type": "string",
"title": "Select 1",
"enum": [
"First option",
"Second option"
]
}
}
},
"ngModelOptions": {},
"type": "fieldset"
}
],
"model": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment