CSS fields¶
CSS fields set styles for attribute values and are configured by the tags
attribute. The similar setting is configured in "options"
with the use of templates. For more detailes see “Options”.
Syntax:¶
{
...
tags: [
"css-class:myCustomCssClass", // добавляем css-класс
"css:background-color:green", // добавляем css-стиль
"css:color:white" // добавляем css-стиль
]
}
Example:¶
{
"caption": "Первый атрибут на первой вкладке",
"type": 1,
"property": "tab_1_1",
"size": 2,
"maskName": null,
"mask": null,
"mode": null,
"fields": [],
"hierarchyAttributes": null,
"columns": [],
"actions": null,
"commands": [],
"orderNumber": 10,
"required": false,
"visibility": null,
"enablement": null,
"obligation": null,
"readonly": false,
"selectionPaginated": true,
"validators": null,
"hint": null,
"historyDisplayMode": 0,
"tags": ["css:background-color:##AFFFAF"]
}
Setting the starting position on the map¶
Example for the attribute of the “Geodata” type:¶
{
"caption": "Координаты",
"type": 100,
"property": "geo",
"size": 2,
"maskName": null,
"mask": null,
"mode": 0,
"fields": [],
"columns": [],
"actions": null,
"commands": null,
"orderNumber": 34,
"required": false,
"visibility": null,
"enablement": null,
"obligation": null,
"readonly": false,
"selectionPaginated": true,
"validators": null,
"hint": "",
"historyDisplayMode": 0,
"tags": [
"tryfind:Хабаровский край",
"tryfind:$address"
],
"selConditions": [],
"selSorting": []
}
Result: when you open the coordinate creation form, the coordinates are automatically determined according to the value of the "tags"
property. Where $address
is the value of the address attribute from the current class.