Custom Payload CMS Fields — Development, Validation, React Components

Standard Payload CMS fields cover 80% of tasks. But when a client needs a color picker from a brand palette — not text, but visually — you have to write a custom component. <cite>[Official Payload CMS documentation for custom fields](https://payloadcms.com/docs/fields/overview)</cite> (Custom Fields

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1285
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1241
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1033
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1104
  • image_website-_0.webp
    Website development for Red Pear
    554

Standard Payload CMS fields cover 80% of tasks. But when a client needs a color picker from a brand palette — not text, but visually — you have to write a custom component. Official Payload CMS documentation for custom fields (Custom Fields) allows adding any UI in the admin panel while preserving strict server-side validation. We often encounter such requests: color selector, custom JSON editor, field with autocomplete from an external API. Built-in types are not flexible, so we develop custom turnkey solutions in 2-3 days. Our experience: more than 10 years in React, TypeScript, Payload CMS. We have completed over 50 projects with custom fields. The average time savings for editors after implementation is 70%. Contact us to discuss your case.

Why Standard Payload CMS Fields Are Not Enough?

Built-in types (text, number, select) are good for typical tasks. But as soon as a non-standard UI is required — visual color selection, custom editor with preview, dynamic data loading — you have to extend functionality. An alternative is to write a plugin, but it is often easier to create a custom field. It gives full control over display and validation, and the code remains within a single collection. Compare: configuring a select with conditional visibility takes 15 minutes, while a custom component with autocomplete from API takes about 4 hours. But the result is much more convenient for the editor. For example, in one project we replaced 10 standard fields with one custom block — filling speed increased 3 times.

How to Create a Custom Field with Validation?

Consider a field for entering a phone number with a +7 mask. Simple validation with a regular expression — but add a custom component to display the mask. Validation is performed both on the client (in the admin) and on the server when saving. This is a typical task we solve regularly.

{ name: 'phone', type: 'text', validate: (value) => { if (!value) return true const phoneRegex = /^\+7\d{10}$/ if (!phoneRegex.test(value)) { return 'Format: +7XXXXXXXXXX' } return true }, } 

For more complex scenarios, such as conditional field visibility, we use admin.condition. This reduces user load: if the checkbox is inactive, the field is hidden.

How to Connect a Custom UI Component? — Payload Custom Fields

For non-standard display in the admin, we create a React component. Data is stored as usual, but the UI changes. Example — ColorPicker:

'use client' import { useField } from 'payload/components/forms' const ColorPickerField = ({ path }: { path: string }) => { const { value, setValue } = useField<string>({ path }) const colors = ['#FF5733', '#33FF57', '#3357FF', '#FF33A8', '#33A8FF'] return ( <div className="field-type"> <label className="field-label">Color</label> <div style={{ display: 'flex', gap: 8 }}> {colors.map(color => ( <div key={color} onClick={() => setValue(color)} style={{ width: 32, height: 32, borderRadius: '50%', background: color, cursor: 'pointer', border: value === color ? '3px solid #000' : '2px solid transparent' }} /> ))} </div> <input type="text" value={value || ''} onChange={e => setValue(e.target.value)} placeholder="#000000" style={{ marginTop: 8 }} /> </div> ) } export default ColorPickerField 

Connection in the collection:

{ name: 'brandColor', type: 'text', admin: { components: { Field: '/fields/ColorPicker/index#ColorPickerField', }, }, } 

Similarly, you can connect custom editors, Figma integrations, or QR code generators. Our engineers take over full component development — from prototype to testing. Get a consultation on your project — write to us.

Why Blocks Are the Best Choice for Flexible Pages?

Blocks are a page builder where the editor chooses a block type (text, image, CTA). Unlike Arrays or Groups, Blocks support different field sets in each block. Let's compare:

Characteristic Blocks Array Group
Different fields per row Yes No No
Drag-and-drop blocks Yes Yes No
Setup complexity Medium Low Low
Page flexibility High Medium Low

Example Blocks configuration:

const TextBlock: Block = { slug: 'textBlock', fields: [ { name: 'content', type: 'richText' }, { name: 'columns', type: 'select', options: [ { label: '1 column', value: '1' }, { label: '2 columns', value: '2' }, ], defaultValue: '1' }, ], } const ImageBlock: Block = { slug: 'imageBlock', fields: [ { name: 'image', type: 'upload', relationTo: 'media', required: true }, { name: 'caption', type: 'text' }, { name: 'fullWidth', type: 'checkbox', defaultValue: false }, ], } 

Using Blocks reduces page development time by 2-3 times compared to Array. The editor builds the layout themselves, and we guarantee correct rendering on all devices. Contact us to discuss your tasks.

What Are Virtual Fields and Why Do You Need Them?

Sometimes you need to calculate a value on the fly without saving it. We use afterRead hooks. Such fields are useful for displaying composite data, such as full name from first and last name. They do not affect performance because they are computed only on read. Example — virtual fullName field:

{ name: 'fullName', type: 'text', hooks: { afterRead: [({ data }) => `${data.firstName} ${data.lastName}`], }, } 

Such fields save database space and simplify the API.

What Is Included in Custom Field Development?

We provide a full cycle: from requirements analysis to deployment and documentation. The table shows key stages.

Stage Duration Result
Requirements analysis 1-2 hours Field specification, UI mockups
Development of 3-5 fields 2-3 days Configs, React components, tests
Integration into project 1 day Installation, setup, compatibility check
Editor training 1-2 hours Video instruction or text guide
Post-deployment support 1 month Bug fixes, consultations

Timelines are approximate. Complex fields (integration with external API) may take longer. We will evaluate your project for free — contact us.

We guarantee quality implementation: all fields undergo code review and unit testing. Get a consultation on your project — write to us.