Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
564 B
2
Indexable
Never
 const handleFormSand = () => {
    const form = document.querySelector('form')
    const nameValue = form?.querySelector('input#gName')?.value
    const descValue = form?.querySelector('textarea#gDesc')?.value 
    // submit form
  }
  
  return (
    <Box as="form" onSubmit={(e) => {
      e.preventDefault()
      handleFormSand()
    }}>
      <Input name="gName" id="gName" placeholder="L'art de ..." mb={3} />
      <Textarea name="gDesc" id="gDesc" rows={6} mb={3} placeholder="Bla bla bla bla bla ..." />
      <Button>Enregistrer</Button>
    </Box>
  );
Leave a Comment