Field visibility APIs only take effect on the record create, edit, and detail forms. They have no effect on record list views.
Show or hide fields
kintone.app.record.setFieldShown(fieldCode, visible)
kintone.app.record.setFieldShown(fieldCode, visible)
kintone.mobile.app.record.setFieldShown(fieldCode, visible)
kintone.mobile.app.record.setFieldShown(fieldCode, visible)
Mobile variant of
setFieldShown. Shows or hides a field on a mobile record form.Available pages: Mobile record create, mobile record editParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fieldCode | string | Yes | The field code of the target field |
visible | boolean | Yes | true to show the field, false to hide it |
Return value
undefinedExample
Open or close field groups
kintone.app.record.setGroupFieldOpen(fieldCode, open)
kintone.app.record.setGroupFieldOpen(fieldCode, open)
Opens or collapses a group field (accordion-style field group) on a record form.Available pages: Record create, record edit, record detail
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fieldCode | string | Yes | The field code of the group field |
open | boolean | Yes | true to expand the group, false to collapse it |
Return value
undefinedExample
Check field visibility
kintone.app.record.isFieldVisible(fieldCode)
kintone.app.record.isFieldVisible(fieldCode)
Returns whether a field is currently visible on a record form.Available pages: Record create, record edit, record detail
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fieldCode | string | Yes | The field code of the target field |
Return value
| Type | Description |
|---|---|
| boolean | true if the field is visible, false if it is hidden |
Example
kintone.app.record.isGroupFieldOpen(fieldCode)
kintone.app.record.isGroupFieldOpen(fieldCode)
Returns whether a group field is currently expanded.Available pages: Record create, record edit, record detail
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fieldCode | string | Yes | The field code of the group field |
Return value
| Type | Description |
|---|---|
| boolean | true if the group field is expanded, false if it is collapsed |
Example
Related
- UI elements — Show or hide buttons and other UI components
- Record create events
- Record edit events