Skip to content

Reset/Reload form on submit? #5014

Answered by brendanbond
dwgreen1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @dwgreen1, thanks for the question. What I do in this case is to hook into the submit event, clear the submission, and refresh the form, something like:

Formio.createForm(formioElement, urlOrFormJson).then((form) => {
  form.on("submit", () => {
    form.submission = {};
    form.resetValue();
    form.refresh();
  });
});

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dwgreen1
Comment options

@brendanbond
Comment options

@dwgreen1
Comment options

Answer selected by brendanbond
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants