Field Types

Reference for all supported field types in the entity system.

11 min read

Field Types

WISEROWS supports 18 field types for modeling any data shape. Each field type comes with its own input UI, validation rules, and rendering behavior across all four views.

This page is the complete reference. For an overview of how fields fit into entity types, see Entity Types.

Quick Reference

18 of 18
Field Type
Category
Stores
Best For
textBasicStringTitles, names, short labels
longTextBasicStringDescriptions, summaries, notes
richTextBasicMarkdownBlog content, formatted documentation
numberBasicNumberPrices, scores, quantities
booleanBasicBooleanToggles, flags, yes/no states
dateDateISO stringPublish dates, deadlines
datetimeDateTimestampEvent times, precise timestamps
selectChoiceStringStatus fields, categories, stages
multiSelectChoiceString[]Tags, labels, multi-category
fileMediaFile refPDFs, CSVs, documents
imageMediaFile refPhotos, thumbnails, banners
urlLinkStringWebsite links, resource URLs
emailLinkStringContact emails
jsonAdvancedObjectMetadata, config, structured data
referenceAdvancedEntity refLink to one entity
relationAdvancedEntity ref[]Many-to-many links
aiGeneratedAdvancedStringAI-written summaries, descriptions
formulaAdvancedComputedCalculated values, derived data

Basic Types

Text

Single-line text input. The most common field type -- use it for titles, names, slugs, and any short string value.

Configuration options:

OptionTypeDescription
minLengthnumberMinimum character count
maxLengthnumberMaximum character count
{
  "name": "Title",
  "slug": "title",
  "type": "text",
  "required": true,
  "config": { "minLength": 1, "maxLength": 200 }
}

Tip
Use text for your entity type's title field. It renders as a clickable link in table view for quick navigation to the entity detail page.

Long Text

Multi-line text area for longer content. Renders as a resizable textarea in forms and truncates in table cells.

Use this for descriptions, notes, summaries, and any plain-text content that may span multiple lines. For formatted content with headings, lists, and links, use Rich Text instead.

{
  "name": "Description",
  "slug": "description",
  "type": "longText",
  "required": false
}

Rich Text

Markdown-enabled text editor with a formatting toolbar. Supports:

  • Bold, italic, and strikethrough
  • Headings (H1 -- H6)
  • Ordered and unordered lists
  • Links and images
  • Code blocks with syntax highlighting
  • Tables
  • Blockquotes
{
  "name": "Body Content",
  "slug": "body",
  "type": "richText",
  "required": true
}

Note
Rich Text fields store content as Markdown. When publishing to external systems (like Sanity CMS), the Markdown is converted to the target format automatically.

Number

Numeric input with optional bounds and precision. Renders as a number input with increment/decrement buttons.

Configuration options:

3 of 3
Option
Type
Description
minnumberMinimum allowed value
maxnumberMaximum allowed value
stepnumberIncrement step (e.g., 0.01 for currency)
{
  "name": "Price",
  "slug": "price",
  "type": "number",
  "required": true,
  "config": { "min": 0, "max": 999999, "step": 0.01 }
}

Tip
Set step to 0.01 for currency values, 1 for integers, or 0.1 for decimals with one precision point. The step also controls the increment/decrement behavior in the UI.

Boolean

True/false toggle. Renders as a switch in forms and a checkmark/cross icon in table view.

Great for flags like "is featured", "is published", "requires review", or any binary state.

{
  "name": "Featured",
  "slug": "is_featured",
  "type": "boolean",
  "required": false,
  "config": { "defaultValue": false }
}

Date Types

Date

Date picker without a time component. Stored as an ISO 8601 date string (e.g., 2026-03-21).

Use for publish dates, deadlines, birthdays, and any date where the specific time doesn't matter.

{
  "name": "Publish Date",
  "slug": "publish_date",
  "type": "date",
  "required": false
}

Info
Date fields enable the Calendar view for the entity type. If your entity type has a date field, users can visualize and manage entities on a calendar.

DateTime

Full date and time picker. Stored as a Unix timestamp (milliseconds since epoch).

Use for event start/end times, precise logging, and any data where both date and time matter.

{
  "name": "Event Start",
  "slug": "event_start",
  "type": "datetime",
  "required": true
}

Choice Types

Select

Single choice from a predefined list of options. Renders as a dropdown in forms and a colored badge in table view.

Configuration options:

OptionTypeDescription
optionsstring[]List of allowed values
{
  "name": "Status",
  "slug": "status",
  "type": "select",
  "required": true,
  "config": {
    "options": ["draft", "review", "published", "archived"]
  }
}

Info
Select fields enable the Kanban view. Each option becomes a column, and entities can be dragged between columns to update their value.

Tip
Use consistent, lowercase option values. They serve as both the stored value and the display label (auto-formatted with capitalization in the UI).

Multi-Select

Multiple choices from a predefined list. Renders as a tag input in forms and a row of chips in table view.

Use for tags, categories, labels, or any field where an entity can belong to multiple groups.

{
  "name": "Tags",
  "slug": "tags",
  "type": "multiSelect",
  "required": false,
  "config": {
    "options": ["tutorial", "news", "case-study", "product-update", "engineering"]
  }
}

Media Types

File

File upload field. Supports any file type. Files are stored securely in Convex file storage with automatic URL generation.

Use for PDFs, CSVs, spreadsheets, documents, and any non-image file attachment.

{
  "name": "Attachment",
  "slug": "attachment",
  "type": "file",
  "required": false
}

Image

Image upload with inline preview. Supports JPEG, PNG, WebP, and SVG formats.

Renders as a thumbnail in table view and a full preview in the entity detail page. Powers the Gallery view card thumbnails.

{
  "name": "Featured Image",
  "slug": "featured_image",
  "type": "image",
  "required": false
}

Tip
For entity types that represent visual content (products, portfolio items, team members), set image as one of the first fields and use the Gallery view as the default view.


URL

Validated URL input. Must start with http:// or https://. Renders as a clickable link in table view.

{
  "name": "Website",
  "slug": "website",
  "type": "url",
  "required": false
}

Email

Validated email address input. Renders as a clickable mailto: link in table view.

{
  "name": "Contact Email",
  "slug": "contact_email",
  "type": "email",
  "required": true
}

Advanced Types

JSON

Raw JSON editor with syntax highlighting and validation. Useful for storing structured metadata, configuration objects, or any data that doesn't fit neatly into other field types.

{
  "name": "Metadata",
  "slug": "metadata",
  "type": "json",
  "required": false
}

Example stored value:

{
  "og_image": "https://example.com/og.png",
  "schema_type": "Article",
  "custom_attributes": { "reading_time": 5, "difficulty": "beginner" }
}

Warning
JSON fields accept any valid JSON. There is no schema validation on the stored value itself -- use this type only when you need maximum flexibility and are comfortable handling unstructured data.

Reference

Link to a single entity in another (or the same) entity type. Creates a foreign-key-like relationship.

Use for "belongs to" relationships: a Blog Post belongs to an Author, a Product belongs to a Category.

{
  "name": "Author",
  "slug": "author",
  "type": "reference",
  "required": false,
  "config": {
    "entityTypeSlug": "team-member"
  }
}

In the UI, reference fields render as a searchable dropdown showing the referenced entity type's title field.

Relation

Many-to-many relationship between entity types. Unlike reference (one-to-one), relation allows linking to multiple entities.

Use for tags, categories, or any case where entities on both sides can have multiple links: a Blog Post can have many Tags, and a Tag can appear on many Blog Posts.

{
  "name": "Related Products",
  "slug": "related_products",
  "type": "relation",
  "required": false,
  "config": {
    "entityTypeSlug": "product"
  }
}

AI Generated

Auto-generated field powered by AI. Configure a prompt template that references other fields using {field_slug} placeholders. When triggered, the AI uses the entity's other field values as context to generate this field's value.

{
  "name": "Meta Description",
  "slug": "meta_description",
  "type": "aiGenerated",
  "required": false,
  "config": {
    "prompt": "Write a compelling meta description for a blog post titled \"{title}\" about {topic}. Keep it under 160 characters. Focus on the value the reader gets."
  }
}

Tip
AI Generated fields are especially powerful for SEO metadata, summaries, social media snippets, and any content that follows a pattern. Write specific prompts with clear constraints (character limits, tone, format) for the best results.

The generation can be triggered manually per entity or in bulk via the content generation system. The AI model used is configured at the project level.

Formula

Computed field based on other fields. Uses JavaScript expressions that reference field values via the fields object.

Formula fields are read-only -- their values are recalculated automatically when dependency fields change.

{
  "name": "Total",
  "slug": "total",
  "type": "formula",
  "required": false,
  "config": {
    "expression": "fields.price * fields.quantity"
  }
}

More expression examples:

4 of 4
Expression
Result
fields.price * fields.quantityMultiply two number fields
fields.first_name + ' ' + fields.last_nameConcatenate text fields
fields.score >= 80 ? 'pass' : 'fail'Conditional logic
Math.round(fields.revenue / fields.visitors * 100) / 100Calculate conversion rate

Warning
Formula expressions run in a sandboxed environment. They cannot access external APIs, the DOM, or any global state. Only fields.* values, Math, and basic JavaScript operators are available.


Field Definition Schema

For developers working with the API, here is the complete field definition shape:

idstringrequired
Unique identifier for the field within the entity type.
namestringrequired
Display label shown in the UI. Must be at least 1 character.
slugstringrequired
Programmatic identifier. Must match `^[a-z][a-z0-9_]*$`.
typeFieldTyperequired
One of the 18 field types listed above.
requiredbooleanrequired
Whether the field must have a non-empty value when creating or updating entities.
configobject
Type-specific configuration. Shape varies by field type (options for select, min/max for number, prompt for aiGenerated, etc.).
showInTablebooleanrequired
Whether this field appears as a column in the default table view.
sortOrdernumberrequired
Display order within the entity type's field list. Lower numbers appear first.

Frequently Asked Questions

Was this helpful?

Command Palette

Search for a command to run...