When I tick the option Remove Form After Submit for a form, this isn't working.

The repsonse I get via AJAX is as following:

{ "status": true, "updaters": [  ], "debug": [  ], "messages_error": [  ], "messages_status": [ { "id": 0, "value": "\x3cp\x3emessage\x3c/p\x3e\n" } ], "messages_warning": [  ], "redirect": null, "preview": null, "form_id": "webform_client_form_27", "options": { "enabled": true, "disable_redirect": true, "remove_form": true, "scroller": true } }

The remove true option is set in this json object, but it seems as if there is nothing being done with it in ajax.js. I will try to create a patch for this as soon as possible.

CommentFileSizeAuthor
#1 ajax.patch1.89 KBfabianderijk

Comments

fabianderijk’s picture

Status: Active » Needs review
StatusFileSize
new1.89 KB

Here's the patch. I created a separate plugin for this.

Anonymous’s picture

Your patch/module works, but it clears the form if there are errors with the inputs/field data.

can you please update your patch so that it retains the form if there are error messages?

brendoncrawford’s picture

Has the patch from #1 been updated?

brendoncrawford’s picture

Status: Needs review » Postponed (maintainer needs more info)