Skip to Content
NSUI

Field group

Read-only label and value pairs in a band, under a small heading.

Use a field group to show a record's header facts at a glance: customer, terms, dates, margin. Each nsui-field-view is one label and value. A view can be editable, locked with a reason, empty, or carry a tip. For fields people type into, use Input and Select.

Views

SetResult
valueDisplay text. Text only, never HTML. Empty shows "—".
editableThe value is a button. Hover shows a border and a pencil. Click, Enter or Space fires editrequest.
placeholderShown in a light tone when an editable view has no value.
locked="reason"A lock after the value. The reason is the tooltip and is read by screen readers. Wins over editable.
tip="text"An info button after the label with this text.
tone="danger"Red value text, for a value that needs attention.

Labels and values line up in every state, so nothing shifts on hover.

Editing

v1 does not edit in place. Listen for editrequest and open your own editor, then set value:

JavaScript
document.addEventListener('editrequest', async (e) => {
  const view = e.target;
  const next = await openShipDateDialog(e.detail.value); // your editor
  if (next) view.value = next;
});

e.detail is { name, value }.

Columns

columns is 1, 2 or 3 (default 2). The group drops to at most 2 columns below 520px of its own width, and to 1 below 320px.

In NetSuite

Add field to bind a view read-only to the current record, as with nsui-input field="memo":

HTML
<nsui-field-group heading="Customer" columns="3">
  <nsui-field-view field="entity"></nsui-field-view>
  <nsui-field-view field="terms"></nsui-field-view>
  <nsui-field-view field="salesrep"></nsui-field-view>
</nsui-field-group>
  • The label comes from the field, unless you set label.
  • The value is the field's display text (getText), refreshed with the record.
  • A field that is disabled on the form locks the view with "Not editable on this form", unless you set locked.
  • A field that is not on the form shows "—".
  • The binding never writes to the record.

API

Attributes

Prop

Type

Slots

Prop

Type

CSS parts

Prop

Type

Attributes

Prop

Type

Events

Prop

Type

CSS parts

Prop

Type

NSUI is a community project. It is not an official Oracle NetSuite product. NetSuite is a trademark of Oracle.

On this page