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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.