Support

Account

Forum Replies Created

  • @seriphyn Sorry for the late reply – just tested, but unfortunately is doesn’t work – for drafts or published pages… But I really appreciate you looking into this for me.

    FYI – I queried the efficacy of your function with ACF support, and they said:

    We’re currently looking at how we can implement validation in Gutenberg Blocks either by ourselves, or by contributing to Gutenberg as we agree we’ve had to wait too long to be able to implement this. There are many upcoming changes to Gutenberg’s saving system we hope will be hook into

    The example code is too broad, and affects non-gutenberg content too, and happens too late in the chain than we’d expect, which is why we’re aiming to get a solution that works properly in the block editor – at the point the rest of page validation occurs.

  • @seriphyn Amazing thank you – but don’t go mad – being able to finally use required fields in GB blocks is good enough for me.

    I am curious though – this looks like a pretty simple solution for a bug that’s been open 4 years – yet it only exists on this page, and hasn’t gained much attention. Am I missing something? I don’t understand why this hasn’t been added to core yet?

    Also, can you explain what $acf = false; does?

    Thanks!

  • @seriphyn Just trying out your solution, but it doesn’t appear to be working… Do you know if this is still a viable solution with the latest ACF and WordPress? Thanks!

    Edit – I’ve found it is working for Publish/Update – but not Save Draft. Is there a different hook available for saving drafts?

    It seems this is the expected behaviour for ACF, so it does not validate drafts regardless. Thanks for posting a solution, much appreciated.

Viewing 3 posts - 1 through 3 (of 3 total)