Home Forums Bug Reports Required fields not working alongside gutenberg Reply To: Required fields not working alongside gutenberg

  • Validation when using the new editor does not work, other than this there are a few other minor issues when using the block editor. If you want to use the block editor then my suggestion for would be to find a way to not use required fields and make sure that the site works even if the information is not added. This is the way I code anyway and I try to do this because my clients sometimes have a hard time with “required fields”. So instead of requiring a value in a field I write my template code to check if the value is available and do different things depending on that. I hard code a “default value” that will be used if they do not enter a value. I put this information about what value will be used by default in the field’s instructions. Even if you set a field to be required it is, in my opinion, a bad idea to assume the field will have a value. What if the field is added after a post is created? That old post will not even have the field and it will not have a value. What if, somehow, that value gets deleted because of an error? Best practices when coding are to always validate all data.

    That being said, I still use ACF without issue, but then again I am not using the new block editor and I will likely never use the new block editor. It is not what my clients need or want. I do not build websites for people that want to, or should be allowed to, tweak the design of the site or its content. I build sites for companies where the design of every element is predetermined and fixed so that every page has a consistent look. 99.9% of my clients do not want to worry about or learn how to deal with content layout, they simply want to add content. I install classic editor on the site and then, beleive it or not, I do not use that either. I use nothing but ACF fields and I use an ACF WYSIWYG editor to replace the classic editor.