reset
The reset
function is used to reset the form. It’s useful when you want to reset the form programmatically, for example, when you want to reset the form from a button click.
Example
<script lang="ts"> import { faviform } from '@tuentyfaiv/svelte-form';
const form = faviform<Data>({ // ...config }); const { reset } = $form;</script>
<button on:click={() => reset()}>Reset form</button>