Single line text
Introduction
In NocoBase, Single line text is the most common text field. It is suitable for short text that fits on one line, such as customer names, order numbers, contacts, address summaries, and external-system identifiers.
Single line text uses the Input interface and the string Field type by default. It can be used as a title field and can participate in filters, sorting, permission rules, workflow conditions, and API queries.
When content might contain line breaks or be long, use Textarea by default. When content has a fixed format, such as an email address, phone number, or URL, use the corresponding specialized field first.
Use cases
Single line text is suitable for these business scenarios:
- Customer names, company names, and contact names
- Order numbers, contract numbers, and project numbers
- Task titles, work-order titles, and article titles
- External-system IDs, synchronization numbers, and business codes
- Short text such as cities, address summaries, and store names
Create and configure
On the collection's Configure fields page, click Add field and select Single line text to create the field.

Field names are referenced by page blocks, permissions, workflows, and APIs after creation. Confirm the name before creating the field to avoid later configuration changes.
Field behavior
The default behavior of a Single line text field is as follows:
Edit configuration
After creation, click Edit beside the field to edit its configuration. Edit fields to adjust how they display and are used in NocoBase, such as the display name, description, default value, validation rules, or automatic removal of leading and trailing spaces.
When a field comes from a synchronized main-database table, editing usually maps the database field to a NocoBase Field type and Field interface. For example, short-text database columns such as varchar and char can be mapped to a Single line text field.
Changing a Field type or Field interface is more than changing a display name. It affects field storage, input components, validation rules, filters, and workflow-variable usage. When the field contains substantial existing data, confirm that its data format is compatible first.
Delete field
Click Delete beside a Single line text field to delete it. You can also select multiple fields and delete them in the main data source.
Deleting a Single line text field created in the main database usually also deletes the actual database column and its values. For a synchronized or external-data-source field, the impact depends on the corresponding data source and field origin.
Deleting a field can affect page blocks, forms, filters, permissions, workflows, APIs, imports and exports, and existing data. Confirm that the field is no longer referenced by business configuration before deleting it.
Use in pages
Single line text fields can be used in most data blocks and form scenarios.
Edit mode
In edit mode, Single line text uses an Input component.

Read mode
In read mode, Single line text is displayed as ordinary text.


