Prevent Metabox form creating a new post

Support MB Frontend Submission Prevent Metabox form creating a new postResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34316
    Nicholas CoxNicholas Cox
    Participant

    Hi

    I was wondering if it was possible to clean solution to prevent a specific metabox id from finalising and creating a new post after successful validation. I ask as I wanted to create a basic contact form and wanted to avoid using another plugin when all of the fields are there in metabox. So once the form is submitted you can send emails using form actions and then avoid storing the data as a post.

    Thanks

    #34332
    Nicholas CoxNicholas Cox
    Participant

    Also if I wanted to prevent the form from creating a new post, can i just force the form to not validate? that way I can send the email and then then return the success message as a error validation?

    no ideal but wondered if there was a better way. I do realise the metabox forms are not for this purpose.

    #34350
    Long NguyenLong Nguyen
    Moderator

    Hi Nick,

    If you do not want to save posts (data) after submitting the form, I think you can create a simple form with HTML code to send the email to the user instead of using MB Frontend Submission.

    Or delete the post after creating and use the setting save_field, set it to false to prevent save field value.

    #34364
    Nicholas CoxNicholas Cox
    Participant

    Hi Long,

    Yes that is correct in regards to the save posts (data). I did not want to create a custom form ideally as Metabox already has the functionality and before and after form submission actions. So saves alot of dev work as i may need more forms in the near future.

    I will try the deletion option. Thanks Long!

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