Draft button that saves even if required fields not completed

Support MB Frontend Submission Draft button that saves even if required fields not completedResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37238
    YasmineYasmine
    Participant

    Hi Long,

    I am making a temporary "save draft" button using the wp update function. The problem I am facing is if they have not completed the required fields, it will not save as draft. The required fields only matter when its submitted, and the point of saving as draft is to work on required fields at a later point. Is there a way to bypass this and save as draft even if required fills have not been completed?

    Many thanks,
    Yasmine

    #37249
    Long NguyenLong Nguyen
    Moderator

    Hi Yasmine,

    You can set the attribute formnovalidate to the submit button or trigger a JS code to remove the attribute required of the field. Please read more on this topic https://stackoverflow.com/questions/18725078/bypass-html-required-attribute-when-submitting

    #37250
    YasmineYasmine
    Participant

    Thank you Long!!!

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