> For the complete documentation index, see [llms.txt](https://docs.dashboardjs.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dashboardjs.net/configuration-options/config/fields.md).

# Fields

Example Config Object

```javascript
config: {
  tabs: {
    "User Profiles": {
      recordSettings: {
        fields: {
          // This is a collection of value/key pair of objects describing the record fields
          // Each key maps to the key of the supplied data to retrieve the value of each field
          Date: {
            // This key name maps to the data
            name: "Date of Birth", // Displayed Name of the field int he dashboard
            position: "left", // Position in the Card View
            dataType: "Date", // This just formats and renders the date in a graphical way
            translation: { "ar-AE": "السن" },
          },
          Status: {
            name: "Marital Status",
            position: "right",
            dataType: "String", // Does nothing at the moment
            // Can use this to modify the data value before displaying it to the dashboard
            onGetValue: function (field) {
              if (
                field.data == "Married" &&
                field.record["Gender"] == "Female"
              ) {
                return (
                '<span style="font-weight: bold;color: #72de72">' +
                field.data +
                "</span>"
                );
              } else {
                return field.data;
              }
            },
            translation: { "ar-AE": "الحالة الزوجية" },
          },
          Name: {
            name: "Name",
            position: "left", // Position in the Card View
            // This controls the visibility of the field.
            // Accepts 3 values: show, hide, disable
            visibility: function (field) {
              // Checks to see if the name of this person contains the phrase (disabled) in the name, then disable this field
              // disable greys out the field and removes all actions on the field (including onClick)
              if (field.data.indexOf("(disabled)") > -1) {
                return "disable";
              } else {
                return "show";
              }
            },
            onClick: function (element, record) {
              console.log("Field Clicked: element, data:", element, record);
            },
            translation: { "ar-AE": "الإسم" },
          },
          Gender: {
            name: "Gender",
            position: "right", // Position in the Card View
            dataType: "String",
            translation: { "ar-AE": "الجنس" },
          },
          Description: {
            position: "left",
            width: "400px",
            style: {
              "grid-column": "span 2",
            },
            class: "justify",
            onGetValue: function (item) {
              // If there is no value
              if (!item.data) {
                return '<span style="color: #c3c3c3">N/A</span>';
              }
            },
            translation: { "ar-AE": "الوصف" },
          },
        },
      }
    }
  }
}

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dashboardjs.net/configuration-options/config/fields.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
