Home › Forums › Feature Requests › Ignore required fields only if post status is Draft › Reply To: Ignore required fields only if post status is Draft
Now i solved editing the function click_ignore like that
click_ignore: function( e ) {
if(jQuery('#post_status').val()=='pending'){
this.$trigger = e.$el;
} else {
// reference
var self = this;
// vars
this.ignore = 1;
this.$trigger = e.$el;
this.$form = e.$el.closest('form');
// remove error message
$('.'+this.message_class).each(function(){
acf.remove_el( $(this) );
});
// ignore required inputs
this.ignore_required_inputs();
// maybe show errors
setTimeout(function(){
self.ignore = 0;
}, 100);
}
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 ACF & ACF PRO 6.0.7 are now available.
— Advanced Custom Fields (@wp_acf) January 18, 2023
✨This release contains bug fixes and improvements while we continue to work on the next major release of ACF.https://t.co/wQgAOpwmUI
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.