Skip to main content
These APIs let you programmatically control the visibility of fields and field groups on record create, edit, and detail forms. Use them inside event handlers to build conditional UI logic.
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

Shows or hides a field on a record form.Available pages: Record create, record edit

Parameters

ParameterTypeRequiredDescription
fieldCodestringYesThe field code of the target field
visiblebooleanYestrue to show the field, false to hide it

Return value

undefined

Example

kintone.events.on('app.record.create.show', (event) => {
  // Hide the "Notes" field on load
  kintone.app.record.setFieldShown('Notes', false);
  return event;
});
Mobile variant of setFieldShown. Shows or hides a field on a mobile record form.Available pages: Mobile record create, mobile record edit

Parameters

ParameterTypeRequiredDescription
fieldCodestringYesThe field code of the target field
visiblebooleanYestrue to show the field, false to hide it

Return value

undefined

Example

kintone.events.on('mobile.app.record.create.show', (event) => {
  kintone.mobile.app.record.setFieldShown('Notes', false);
  return event;
});

Open or close field groups

Opens or collapses a group field (accordion-style field group) on a record form.Available pages: Record create, record edit, record detail

Parameters

ParameterTypeRequiredDescription
fieldCodestringYesThe field code of the group field
openbooleanYestrue to expand the group, false to collapse it

Return value

undefined

Example

kintone.events.on('app.record.detail.show', (event) => {
  // Collapse the "Details" group field on load
  kintone.app.record.setGroupFieldOpen('Details', false);
  return event;
});

Check field visibility

Returns whether a field is currently visible on a record form.Available pages: Record create, record edit, record detail

Parameters

ParameterTypeRequiredDescription
fieldCodestringYesThe field code of the target field

Return value

TypeDescription
booleantrue if the field is visible, false if it is hidden

Example

kintone.events.on('app.record.edit.show', (event) => {
  const visible = kintone.app.record.isFieldVisible('Notes');
  console.log('Notes field visible:', visible);
  return event;
});
Returns whether a group field is currently expanded.Available pages: Record create, record edit, record detail

Parameters

ParameterTypeRequiredDescription
fieldCodestringYesThe field code of the group field

Return value

TypeDescription
booleantrue if the group field is expanded, false if it is collapsed

Example

kintone.events.on('app.record.detail.show', (event) => {
  const isOpen = kintone.app.record.isGroupFieldOpen('Details');
  console.log('Details group open:', isOpen);
  return event;
});

Build docs developers (and LLMs) love