Join the Webstudio community

Updated last month

it is possible reset state form?

At a glance
Hi. It is possible reset state form, after sending to initial?
1
M
s
J
7 comments
@szymonszczechowicz , can you explain your issue?

Do you simply mean an input type of "reset"? https://www.w3schools.com/tags/att_input_type_reset.asp
No. I mean that after submitting the form on the page and showing the "success" state, it should reset back to the "initial" state, so the form can be submitted again without reloading the page. I’m not sure if I’m explaining it clearly, but what I want is to give the user the option to submit the form multiple times.
Are you using a Webhook form that displays the "success message"?

A couple of ideas:
  1. in the "success message", include a button that refreshes the page but it says something like "submit another"
  2. write JS to auto-refresh after the success message
  3. use the other form type, create a toast message saying that it's been submitted and clear the form (this would be JS)
Reloading the page is not an option because the form opens in a dialog, and reloading would reset the visibility of the currently open dialog — and I have many of them on the page.

So it comes down to playing with JS. I was hoping there might be an easier way to handle this...
you will need js for this
Add a reply
Sign up and join the conversation on Discord