Skip to content

Clear form after submit #3

@kawanuaid

Description

@kawanuaid

Hello,
How to clear the form after successful submission?

I've been trying to add function like below, but didn't clear the form.

  const emptyForm = () => {
    setNamaLengkap('');
    setNamaPanggilan('');
    setNamaBaptis('');
    setKtp('');
  }
<Form className="form" onSubmit={emptyForm}>
...
</Form>

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions