Skip to content

Field API: support registering custom field controls #74856

Open

Description

@oandregal

Part of #61084 and #73076
Related #74858

What

Add the ability to register custom Edit controls that field authors can use in their block fields declaratively, as in:

{
  id: 'myField',
  type: 'text',
  Edit: 'myCustomControl'
}

Why

Some use cases require interactions that are context-specific and cannot use the controls bundled by DataForm. BlockFields are an example of this, where we need the ability to register custom controls to handle media or links.

Custom controls can already be provided to fields, as in:

{
  id: 'myField',
  type: 'text',
  Edit: ({ data, field, onChange }) => { /* custom edit */ }
}

However, this can't be serialized, which prevents us from using the DataForm API in places where we require a JSON format (block attributes, PHP server-side, etc.). We need to support declarative approach for those scenarios.

How

The first step is to pass a configuration prop to the existing components (DataViews, DataForm, DataViewsPicker) with the custom edit controls.

A future next step will be to open this up for registration (see).

Activity

  1. added
    [Type] Enhancement
    [Feature] DataViews
    on Jan 22, 2026
  2. changed the title [-]Support registering custom field controls[/-] [+]Field API: support registering custom field controls[/+] on Jan 22, 2026
  3. youknowriad commented on Jan 22, 2026

    @youknowriad
    Contributor

    I'll repeat what I commented on the other PR.

    I think we should avoid global functions and registries, I'd prefer a "settings" prop instead on DataForm / DataViews

  4. oandregal commented on Jan 23, 2026

    @oandregal
    MemberAuthor

    Updated the issue description as per this conversation.

  5. oandregal commented on Jan 26, 2026

    @oandregal
    MemberAuthor

    I'm looking into this one.

  6. added
    [Status] In Progress
    on Jan 26, 2026
  7. moved this to 🦵 Punted to 7.1 in WordPress 7.0 Editor Taskson Feb 25, 2026
  8. moved this to 📋 Iteration/Tracking Issues in WordPress 7.1 Editor Taskson Jun 10, 2026
  9. t-hamano commented on Aug 12, 2026

    @t-hamano
    Contributor

    Punting this to 7.2 as the 7.1 release is scheduled for next week.

  10. moved this from 📋 Iteration/Tracking Issues to 🦵 Punted to 7.2 in WordPress 7.1 Editor Taskson Aug 12, 2026
  11. moved this from 🏗️ In Progress to 📋 Iteration/Tracking Issues in WordPress 7.2 Editor Taskson Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[Feature] DataViews[Status] In Progress[Type] Enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions