Hi, using ACF 4.4.0 I’ve found a problem when saving a new field group without specifying the title.
The flow is:
– click add new field group
– add all custom field needed
– click on publish
– alert “Field group title is required”
– added the title
– the publish button is not clickable
– redo all work from the first step
The solution I’ve used is simply to remove the class “disabled” from the button via js, here is the diff:
--- a/src/core/plugins/advanced-custom-fields/js/field-group.js
+++ b/src/core/plugins/advanced-custom-fields/js/field-group.js
@@ -135,14 +135,19 @@ var acf = {
* @return N/A
*/
- $(document).on('submit', '#post', function(){
+ $(document).on('submit', '#post', function(event){
// validate post title
var title = $('#titlewrap #title');
if( !title.val() )
{
+ event.preventDefault();
+
alert( acf.l10n.title );
+
+ $('#publish').removeClass('disabled');
+ $('#publishing-action .spinner').hide();
title.focus();
Hi @giacomozinetti,
Thanks for posting the fix on this one.
This issue should be resolved in the latest version 🙂