budibase/packages/server/appPackages/testApp2/components/Contact/Contact Form.json

108 lines
3.2 KiB
JSON
Raw Normal View History

2019-10-18 18:32:03 +02:00
{
"name": "Contact/Contact Form",
"description": "Control for creating/updating '/contacts/3-{id}' ",
"inherits": "@budibase/standard-components/container",
2019-10-18 18:32:03 +02:00
"props": {
"className": "p-1",
"children": [
{
"component": {
"_component": "@budibase/standard-components/h3",
"text": "Edit Contact"
}
},
{
"component": {
"_component": "@budibase/standard-components/form",
"formControls": [
{
"control": {
"_component": "@budibase/standard-components/input",
"value": {
"##bbstate": "Contact.name",
"##bbsource": "store"
},
"className": "form-control",
"type": "text"
},
"label": "Name"
},
{
"control": {
"_component": "@budibase/standard-components/input",
"value": {
"##bbstate": "Contact.contacted",
"##bbsource": "store"
},
"className": "form-control",
"type": "text"
},
"label": "Has Been Contacted"
}
]
}
},
{
"component": {
"_component": "@budibase/standard-components/stackpanel",
"direction": "horizontal",
"children": [
{
"control": {
"_component": "@budibase/standard-components/container",
2019-10-18 18:32:03 +02:00
"className": "btn-group",
"children": [
{
"component": {
"_component": "common/Primary Button",
"contentText": "Save Contact",
"onClick": [
{
"##eventHandlerType": "Save Record",
"parameters": {
"statePath": "Contact"
}
},
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingContact",
"value": ""
}
}
]
}
}
]
}
},
{
"control": {
"_component": "@budibase/standard-components/container",
2019-10-18 18:32:03 +02:00
"className": "btn-group",
"children": [
{
"component": {
"_component": "common/Default Button",
"contentText": "Cancel",
"onClick": [
{
"##eventHandlerType": "Set State",
"parameters": {
"path": "isEditingContact",
"value": ""
}
}
]
}
}
]
}
}
]
}
}
]
}
}