• Hi,

    On ‘Add new post’ forms, how can I make a form resets, to be able to add new form entry after successful ajax submission ?
    (For example I have a contact us form and I don’t want the users be able to edit their submitted forms.)

    There is already an option for set reset form, but it is only appears when choose ‘reload current page/post’ after submission.

    Thank you and have a great day

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter amirosein

    (@amirosein)

    Dear Shapti,
    A hint is appreciated.

    Bests

    Plugin Author Shabti Kaplan

    (@shabti)

    @amirosein,

    Thank you for all your help answering questions. I highly appreciate it.

    I apologize for taking so long with this…. It’s actually really simple: Under the Actions tab, under the “Redirect After Submit” select, choose the “none” option, which means there is no redirect, but the form resets

    Thread Starter amirosein

    (@amirosein)

    @shabti

    Thank you for your response.
    I already set the form option “redirect after submit” to “None”. I have a lot of forms and all of them are set to none and works perfectly. For forms with type “Edit post” it should keep fields value after submission as it already keeping, but for forms with type “New post” it should reset form and it’s not resets it.

    I have tested it also with disabling all plugins and a default theme, and also with/without using elementor widget or putting shortcode directly in a canvas page, no luck.

    As a temporary solution I put a mutation observer in the page that checks if successful message appeard, it will reset form fields value, but as you know it doesn’t act as a real reset for acf form to handle all prepare_field or load_field filters.

    Thread Starter amirosein

    (@amirosein)

    Additional information:
    When you set the field “Save Custom Fields to…” to “submission only” in form setting, it will clear/reset form fields values after submission.
    But when you set “Save Custom Fields to…” to “Post”, the form fields values remains in the form after submission.

    Thread Starter amirosein

    (@amirosein)

    @shabti It would be great if you can help. thank you

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