Required condition in the fields - filter to enable save draft

Support General Required condition in the fields - filter to enable save draftResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32447
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello,

    Thank you very much for the required condition option.

    I have many custom fields with the required condition, in this scenario without meeting the condition, my posts are not saving in the database (auto-draft).

    So, is there any hook to save the post as a draft even the required conditions are not validated? I need the required validation only to block the 'publish' option.

    Note:
    - enabled save field option in the meta box
    - disabled the posts_revision in the wp-config

    Thanks.

    #32460
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Unfortunately, there is no hook to bypass the condition to save the post as a draft. The validation works by JavaScript code or browser filter so it will prevent sending data to the server to save the post.

    #32461
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello,

    Thank you very much for your info. I thought that validation with input attributes function can be overridden.

    Is there any way to customize that javascript/jquery function as discussed in the forum
    https://wordpress.stackexchange.com/questions/15546/dont-publish-custom-post-type-post-if-a-meta-data-field-isnt-valid ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.