Today, we’re excited to release the first beta of ACF PRO 6.3.
We’ve packed this release full of some of the most common feature requests from our ACF Blocks users, the biggest of these are field validation support and the ability to store field data of a block in the postmeta table, which are the focus of our beta 🎉
PRO users can find the release in their account.
ACF fields can have validation rules applied to them, like being required or minimum and maximum values. These validation rules have worked only for post wide fields and not for fields inside ACF Blocks. Creating a system for validation of block fields inside the block editor has been a large technical challenge and wasn’t something ACF has supported until now.
Validation for fields in ACF Blocks is enabled by default for all blocks, and works the same way as validation works for field groups assigned to posts, pages or other data objects, supporting all the same custom validation logic and filters.
Any existing posts with ACF Blocks will be validated the next time the page is edited, and any fields failing validation, such as empty required fields, will mean the page cannot be saved again until the issues are resolved.
When you add a new ACF Block to the page, the validation will only run the first time you deselect the block, or try to save the page to avoid interrupting you while you’re editing a block.
You can disable block validation by adding the validate: false
(default true) attribute to your block.json
ACF key.
By default, WordPress stores a block’s field data inside the block’s HTML comment in post_content
. This is fine for many situations, but you may also want to create an ACF Block that saves and reads its data from post meta to make it easier to query.
ACF 6.3 makes this possible with a new block.json
attribute: usePostMeta: true
(default false)
This functionality would enable you to create a custom post type, with a locked block template, letting you replicate a classic editor-like experience where only your block exists to enter specific structured data. This data would then be stored in post meta and allow you to query it easily.
We’ve increased the minimum versions of WordPress and PHP required to use ACF and ACF PRO. ACF now requires WordPress version 6.0 or newer, and PHP 7.4 or newer.
We’ll have full details of the other changes in ACF 6.3 in the final release post, but we’ve packed this release full with other common requested features, such as new advanced conditional logic selection for specific values of post objects, taxonomies, page links, relationships and user fields.
We’ve also added a new icon picker when creating or editing ACF Post Types or Option Pages, allowing you to select the dashicon, media or URL you want to use as the admin menu icon.
There’s a new ACF section in the WordPress Site Health screens which contains debug and settings information for your ACF configuration. This will be helpful for debugging common issues you might have when developing with ACF, and makes it easier to copy and paste during interactions with our support team.
Finally, as we proposed in ACF 6.2.7’s release notes, the ACF Shortcode is now disabled by default for new installs of ACF, first installed after the release of 6.3.
selected
attribute to specify which should be selected by default, and support class attributes