Set Field Style
Set Field Style - kintone.app.record.setFieldStyle()
Sets the style of a field in the current record.
Function
kintone.app.record.setFieldStyle(fieldCode, config)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| fieldCode | String | Yes | The field code. |
| config | Object / String | Yes | The field style settings.
|
| config.content | Object / String | Optional | The field style settings to apply to the field content.
|
| config.content.backgroundColor | String | Optional | The background color of the field content. Specify a 6-digit hexadecimal color code, such as #ffffff. |
| config.content.color | String | Optional | The text color of the field content. Specify a 6-digit hexadecimal color code, such as #ffffff. |
| config.content.fontWeight | String | Optional | The font weight of the text in the field content. The following values can be specified:
|
| config.content.textDecoration | String | Optional | The text decoration of the field content, such as underline or strikethrough. The following values can be specified:
|
| config.content.borderColor | String | Optional | The border color of the field content. Specify a 6-digit hexadecimal color code, such as #ffffff. |
| config.background | Object / String | Optional | The field style settings to apply to the background.
|
| config.background.backgroundColor | String | Optional | The background color of the field. Specify a 6-digit hexadecimal color code, such as #ffffff. |
| config.label | Object / String | Optional | The field style settings to apply to the label field.
|
| config.label.color | String | Optional | The text color of the label field. Specify a 6-digit hexadecimal color code, such as #ffffff. |
| config.label.fontWeight | String | Optional | The font weight of the text in the label field. The following values can be specified:
|
| config.label.textDecoration | String | Optional | The text decoration of the label field, such as underline or strikethrough. The following values can be specified:
|
Each style can be removed by setting DEFAULT to each property.
Returns
A Promise object.
When the Promise object is fulfilled, no value is returned.
Sample Request
|
|
Available Pages
- Record Create
- Record Edit
Notes
Depending on the combination of the settings, minor display issues may occur.
The settings for each property may be updated in future product releases.
Limitations
The following fields are not supported:
- Status
- Assignee
- Table
- Related records
- Field group
- Border
- Label
- Blank space
The following fields do not support the content settings:
- Rich text
- Calculated
- Record number
- Created by
- Created datetime
- Updated by
- Updated datetime
- Text Fields with the "Calculate automatically" option