You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Field API: support registering custom field types #74858
However, fields like that one 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. See, for example, BlockFields where we may need to register a rich-text field type, if it cannot be bundled in DataForm.
How
The first step is to pass a configuration prop to the existing components (DataViews, DataForm, DataViewsPicker) with the custom field types.
A future next step will be to open this up for registration (see).
Riad and I talked about this, and he shared the lessons learned by the block editor and global registries. There will be situations where consumers want to register/unregister X depending on some context (e.g., different pages), and it becomes a challenge in a SPA.
Given we're implementing this issue and #74856 to enable BlockFields work (it's core code we control), we're scoping down this issue to only make it work with a settings config for the components (DataViews, DataForm, DataViewsPicker). A future next step will be to open this up via registration.
Thanks for bringing this up. To support registering custom field types, you might want to look into extending the existing Field API by adding a registration method. This could allow you to define and register new field types that integrate smoothly with Gutenberg.
If you’d like, feel free to share a proposal or example code, and the community can help review and improve it. Looking forward to seeing your ideas!
Activity
youknowriad commentedon Jan 22, 2026
No, I think we should avoid global functions and registries, I'd prefer a "settings" prop instead
youknowriad commentedon Jan 22, 2026
Also worth noting that registering fields and registering controls are two different things.
youknowriad commentedon Jan 22, 2026
I realize the issue is about field types, this is also a DataViews/DataForm concern so I see it as part of the "settings" prop as well.
oandregal commentedon Jan 23, 2026
Riad and I talked about this, and he shared the lessons learned by the block editor and global registries. There will be situations where consumers want to register/unregister X depending on some context (e.g., different pages), and it becomes a challenge in a SPA.
Given we're implementing this issue and #74856 to enable BlockFields work (it's core code we control), we're scoping down this issue to only make it work with a settings config for the components (DataViews, DataForm, DataViewsPicker). A future next step will be to open this up via registration.
dmytropetrash commentedon Jan 26, 2026
Hi there!
Thanks for bringing this up. To support registering custom field types, you might want to look into extending the existing Field API by adding a registration method. This could allow you to define and register new field types that integrate smoothly with Gutenberg.
If you’d like, feel free to share a proposal or example code, and the community can help review and improve it. Looking forward to seeing your ideas!
t-hamano commentedon Jul 10, 2026
With the release of 7.1 Beta 1 imminent, and there are no activities, I will remove this from the project board.