1 May

ACF PRO 6.3 Beta 1

By Liam Gladdy

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.

Block Validation

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.

Disabling Block Validation

You can disable block validation by adding the validate: false (default true) attribute to your block.json ACF key.

Block Field Storage in Post Meta

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.

Other Changes

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.

Full Changelogs

  • New – ACF now requires WordPress version 6.0 or newer, and PHP 7.4 or newer.
  • New – ACF Blocks now support validation rules for fields
  • New – ACF Blocks now supports storing field data in the postmeta table rather than in the post content
  • New – Conditional logic rules for fields now support selecting specific values for post objects, page links, relationships and users rather than having to enter the ID
  • New – Icon selection for a custom post type menu icon
  • New – Icon selection for an options page menu icon
  • New – ACF now surfaces debug and status information in the WordPress Site Health area
  • New – The escaped html notice can now be permanently dismissed
  • Enhancement – Tab field now supports a selected attribute to specify which should be selected by default, and support class attributes
  • Fix – Block Preloading now works reliably in WordPress 6.5 or newer
  • Fix – Custom post types registered with ACF will now have custom field support enabled by default to better support revisions
  • Fix – The first preview after publishing a post in the classic editor now displays ACF fields correctly
  • Fix – ACF fields and Flexible Content layouts are now correctly positioned while dragging
  • Fix – Copying the title of a field inside a Flexible Content layout no longer adds whitespace to the copied value
  • Fix – Flexible Content layout names are no longer converted to lowercase when edited
  • Fix – ACF Blocks with attributes without a default now correctly register
  • Fix – User fields no longer trigger a 404 when loading results if the nonce generated only contains numbers
  • Fix – Description fields for ACF items now support being solely numeric characters
  • Fix – The field group header no longer appears above the WordPress admin menu on small screens
  • i18n – All errors raised during ACF PRO license or update checks are now translatable
  • Other – The ACF Shortcode is now disabled by default for new installations of ACF as discussed in the ACF 6.2.7 release notes

About the Author