How can i give a Button the defenitions type="submit" and type="reset"?

I have to include in my projects forms with a button to send and a button to cancel. How can i give a button the defenitions type=“submit” and type=“reset”?

By default, the webflow form button has a a type=“submit”. So for the reset button, you would either;

1. Drag a custom code element into the form and add the code as follows;

<input class="your-custom-class w-button" type="reset" value="Reset">

2. Add the attribute with custom code (my preferred method)

-Give you reset button an ID, for example reset
-Add the attribute by placing this code in your before </body> section of custom code;

<script>
  $(document).ready (function () {
     $('#reset').attr('type','reset');
  });
</script>

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.