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

78 lines
2.1 KiB
JSON

{
"name": "customer Form",
"description": "All fields on record '/customers/1-{id}' ",
"inherits": "@budibase/standard-components/stackpanel",
"props": {
"direction": "vertical",
"children": [
{
"control": {
"_component": "common/H1",
"value": "Edit customer"
}
},
{
"control": {
"_component": "@budibase/standard-components/form",
"formControls": [
{
"label": "name",
"control": {
"_component": "@budibase/standard-components/textbox",
"value": {
"##bbstate": "currentcustomer.name",
"##bbsource": "store"
}
}
}
]
}
},
{
"control": {
"_component": "@budibase/standard-components/stackpanel",
"direction": "horizontal",
"children": [
{
"control": {
"_component": "@budibase/standard-components/panel",
"padding": "20px",
"component": {
"_component": "common/Primary Button",
"contentText": "Save customer",
"onClick": [
{
"##eventHandlerType": "Save Record",
"parameters": {
"statePath": "currentcustomer"
}
}
]
}
}
},
{
"control": {
"_component": "@budibase/standard-components/panel",
"padding": "20px",
"component": {
"_component": "common/Secondary Button",
"contentText": "Cancel",
"onClick": [
{
"##eventHandlerType": "Save Record",
"parameters": {
"statePath": "currentcustomer"
}
}
]
}
}
}
]
}
}
]
}
}