don't hide form after submission

Support MB Frontend Submission don't hide form after submission

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #49830
    aryanrajaryanraj
    Participant

    Hi, i am using this shortcode, mainly ajax enabled. [mb_frontend_form id='books' post_fields='' ajax="true"]

    I want the form once submitted clear the form so a new entry can be added without reloading. Even with ajax disabled, it only show success message and not blank form.

    how to keep the form visible after submission?

    #49836
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    If you want to keep the form visible after submission, you can use the attribute edit="true". However, it will disable the ajax option.
    This is noted in the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#adding-the-submission-form

    #49840
    aryanrajaryanraj
    Participant

    edit="true" will edit the current added data and not reload with blank form. this is really useful to have the blank form visible after submission. how can i raise a feature request for this?

    #49844
    PeterPeter
    Moderator

    Hello,

    I think you can redirect to the page that has the frontend form after submitting, so the page will have the blank form as well. Please check the hook to make the redirection in the documentation
    https://docs.metabox.io/extensions/mb-frontend-submission/#general-hooks

    #49845
    aryanrajaryanraj
    Participant

    Hi yes, i can use the redirection but there will be hundreds of forms and giving redirection would be a hassle as form page permalink can change in future.

    i want it to act like a contact form where data once submitted, clear the filled form via ajax/reload (current page) and show a success message (optional).

    thanks.

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