Overriding field captions
This guide describes how you can override field captions that are displayed everywhere in Flexmonster UI.
By default, a caption is the same as the field’s unique name. You can specify a custom caption for the field using the mapping in your code or the embedded JSON or CSV metadata.
Using mapping
Specify a custom caption for the field in the mapping.<field_name>.caption property:
dataSource: {
type: "json",
data: [
["price", "item", "order_date"],
[100, "Headphones", "2025-04-12"]
],
mapping: {
"price": {
caption: "Price"
},
"item": {
caption: "Item"
},
"order_date": {
caption: "Order Date"
}
}
}
The specified captions will now be displayed everywhere in the component’s UI.
Using the metadata
The specified captions will now be displayed everywhere in the component’s UI.
Note Captions set in the mapping override captions from the metadata.
Using the UI (for measures in the pivot view)
You can set a custom caption for measures in the pivot table through the field list:
Step 1. Open the field list.
Step 2. In the Values box, find the measure you want to rename and select .
Step 3. In the Edit measure window, enter a new name in the Caption field.
Step 4. Select Apply in the Edit measure window.
Step 5. Select Apply in the field list.