Widget Example
Example on how to configure use widget in form recipe
person.recipe.json
{
"name": "person",
"type": "CORE:UiRecipe",
"description": "Person form",
"plugin": "@development-framework/dm-core-plugins/form",
"config": {
"type": "PLUGINS:dm-core-plugins/form/FormInput",
"attributes": [
{
"name": "date_of_birth",
"type": "PLUGINS:dm-core-plugins/form/fields/StringField",
"widget": "DateTimeWidget"
}
],
"fields": [
"name",
"date_of_birth"
]
}
}
Person.blueprint.json
{
"name": "Person",
"type": "CORE:Blueprint",
"description": "",
"attributes": [
{
"name": "type",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"optional": false
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"label": "Name"
},
{
"name": "date_of_birth",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"label": "Date of birth"
}
]
}
person.entity.json
{
"type": "./Person",
"_id": "1179c897-df62-445f-87e4-f393b4253936",
"name": "Joe Biden",
"date_of_birth": "1942-11-20T00:00:00.000+01:00",
"address": {
"street": "1600 Pennsylvania Avenue NW",
"postal_code": "20500",
"city": "Washington DC"
}
}