Skip to content

Fields, Conditions & Validation

Entries maps blueprint fields directly to ProcessWire and React form controls. You get native validation, responsive column widths (columnWidth: 50), tabs, collapsible sections, and conditional visibility without creating ProcessWire database fields.

  • Text & rich content: text, textarea, markdown, richtext (Tiptap editor), email, url, slug, password, secret, otp
  • Numbers & measurements: integer, float, unit_number, currency / money, range, range_slider, rating, calculation, computed
  • Choices, toggles & international: checkbox, toggle, select, radios, checkboxes, asmselect, combobox, segmented, tags (texttags), color, icon, phone, country, timezone
  • Dates & time: date, time, datetime, daterange
  • Media & structured data: image, file, keyvalue, json, link, signature
  • Relations: page, entry, reverse (join), table
  • Layout & containers: blocks (repeater), fieldset, section, tab, markup, spacing, colspan

Using third-party ProcessWire Fieldtype* and Inputfield* modules

Section titled “Using third-party ProcessWire Fieldtype* and Inputfield* modules”

type: also accepts any installed ProcessWire Fieldtype* or Inputfield* class name (such as FieldtypeColor, FieldtypeMapMarker, or InputfieldURL). Entries delegates sanitization, sleep/wakeup, and input rendering automatically using a lightweight virtual field host.

Generates a sanitized slug from another field (default from: title) in real time inside the admin editor:

fields:
title:
type: text
label: Destination Title
required: true
useLanguages: true
slug:
type: slug
label: URL Slug
from: title
unique: true
index: true
useLanguages: true

Generates cryptographically secure tokens via random_bytes() and displays a Generate / Show-Hide / Copy toolbar while masking values in tables and $item->markupValue('api_key'):

fields:
api_key:
type: secret
label: Webhook Signing Secret
prefix: whsec_
bytes: 32
autoGenerate: true
unique: true
index: true

computed (Derived and auto-indexed values)

Section titled “computed (Derived and auto-indexed values)”

Mark a field type: computed or attach compute: to any scalar field (text, float, integer). Computed fields are read-only in forms and recalculated automatically on wakeup, save, and indexing:

fields:
# 1. Template interpolation with dot-paths
display_code:
type: computed
label: Display Code
compute: '{port_code} - {title} ({country.title})'
index: true
# 2. Method name on a custom EntryItem class
gross_weekly_rate:
type: float
label: Gross Weekly Rate
compute: calculateGrossRate
index: true

In a .php blueprint, compute can also be a closure:

'gross_weekly_rate' => [
'type' => 'float',
'label' => 'Gross Weekly Rate',
'index' => true,
'compute' => static fn(\Totoglu\Entries\Entity\EntryItem $item): float => round((float) $item->net_rate * 1.2, 2),
],
fields:
home_port_page:
type: page
label: Linked Destination Page
one: true
derefAsPage: 1
findPagesSelector: 'template=destination, sort=title'
inputfield: InputfieldPageAutocomplete
index: true
departure_port:
type: entry
label: Departure Port
allowedTypes: [ports]
one: true
inputfieldWidget: picker
viewMode: cards
labelFieldFormat: '{title} ({port_code})'
addable: true
syncWith: sister_ports
index: true

syncWith keeps bidirectional relations synchronized automatically when either record is saved. For annotated relations with extra per-link attributes, see Pivot References & Dynamic Schemas.

keyvalue renders an ordered drag-and-drop map editor (InputfieldReactKeyValue) with paste support and full selector indexing when index: true is set:

fields:
specifications:
type: keyvalue
label: Technical Specifications
keyLabel: Parameter
valueLabel: Specification
keyPattern: '^[a-z0-9_-]+$'
minItems: 1
maxItems: 20
index: true
custom_payload:
type: json
label: Webhook Body Template
rows: 8

When index: true is enabled on specifications, you can query sub-keys directly:

$fastMachines = wire()->entries->find('type=hardware, specifications.cpu*=M4, specifications.cores>=16, specifications.count>=3');

Displays all records in another collection that reference the current entry, complete with a pre-filled + Add New button in the admin editor:

fields:
seasonal_rates:
type: reverse
label: Seasonal Rate Cards
collection: yacht_rate_cards
on: season
selector: 'sort=weekly_rate'
summaryFormat: '{title} (EUR {weekly_rate})'

Read it in PHP like any relation: $rates = $season->get('seasonal_rates');.

Section titled “link, icon, and international controls (phone, country, timezone)”
  • type: link stores canonical pageId, resourceType, resourceId, url, and blueprintType keys so links to ProcessWire pages, Entries records, external URLs, and #anchors resolve cleanly.
  • type: icon stores an icon value accessible via $item->iconValue().
  • type: phone, type: country, and type: timezone render built-in international pickers (E.164 calling codes, ISO countries, IANA timezones).

Extended interactive controls (React form controls)

Section titled “Extended interactive controls (React form controls)”
fields:
weekly_price:
type: unit_number
label: Weekly Rate
unitVariant: currency
units: [EUR, USD, GBP]
defaultUnit: EUR
precision: 2
total_with_vat:
type: calculation
label: Total With VAT
formula: 'weekly_price * 1.2'
precision: 2
guest_range:
type: range_slider
label: Guest Capacity Range
min: 2
max: 24
step: 1
rating:
type: rating
label: Comfort Rating

Selection fields (select, combobox, radios, checkboxes, asmselect, segmented, tags) accept static maps or dynamic runtime sources:

fields:
# Uses UUID as value and labelField as label
season_id:
type: select
label: Season
options: '@collection:seasons'
# Custom valueField ('code') and labelField ('title')
season_code:
type: select
label: Season Code
options: '@collection:seasons.code:title'

Conditional visibility and cross-field validation

Section titled “Conditional visibility and cross-field validation”

Control visibility, requirements, and editability dynamically with selector expressions:

fields:
discount_type:
type: segmented
label: Discount Type
options: { none: None, percent: Percentage, fixed: Fixed Amount }
default: none
discount_value:
type: float
label: Discount Amount
showIf: 'discount_type!=none'
requiredIf: 'discount_type!=none'
readOnlyIf: 'is_locked=1'
validateIf: 'discount_type!=none'
min: 1
start_date:
type: date
label: Start Date
required: true
end_date:
type: date
label: End Date
required: true
afterField: start_date
disembarkation_port:
type: entry
allowedTypes: [ports]
one: true
differentFrom: departure_port

Supported validation rules: required, validateIf, min, max, minTime, maxTime, minLength, maxLength, pattern, minItems, maxItems, differentFrom, gteField (afterField / minField), gtField, lteField (beforeField / maxField), and ltField.

Smart table helpers and field presentation

Section titled “Smart table helpers and field presentation”

Customize how fields appear and behave in collection tables:

fields:
client_name:
type: text
label: Principal Client
columnLabel: Client
truncate: 40
contactLinks:
email: client_email
tel: client_phone
whatsapp: client_phone
client_phone:
type: phone
label: Phone
tableLink: [tel, whatsapp]
whatsappText: 'Hello {client_name}, regarding {reference_code}'
copyable: true
weekly_rate:
type: float
label: Weekly Rate
prefix: EUR
inlineEdit: true
summary: sum
index: true
  • tableLink accepts edit, view, both, email, tel, whatsapp, telegram, url, map, multi-channel arrays like [tel, whatsapp], custom URL templates such as 'https://example.com/ports/{port_code}', or false to disable linking.
  • inlineEdit: true enables one-click editing right inside table rows.
  • summary (sum, avg, min, max, count) adds a live SQL footer row to the table.
  • prefix / suffix, showCount, textformatters, actions, and renameFrom (for zero-downtime field key renames) work on any field.

Next steps