Business
Jobs
  • About Us
  • Solutions
    • Candidates
      Highly qualified candidates in 48h.
    • Assessments
      500+ technical and psychological assessments, plus anti-fraud system.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Pay in 15+ LATAM countries without setting up a local entity.
  • Pricing
  • Jobs

0

166
Views
Botón ejecutar un formulario en otra función en reaccionar

Necesito que la función Formulario() se abra con el botón "Eu li, concordo e aceito".

 async function Formulario() { const schema = Yup.object().shape({ nome: Yup.string().required("Obrigatório!"), cpf: Yup.string().required("Obrigatório!"), }); const submitvalue = () => { const frmdetails = { 'Nome': nonce, 'Cpf': cpff }; }; return ( <ModalContent> <h2>Dados do assinante</h2> <Form schema={schema}> <Row> <Col> <Input type="text" placeholder="Nome" onChange={e => setNome(e.target.value)} /> </Col> </Row> <Row hascols> <Col> <InputMask type="text" placeholder="Cpf" onChange={e => setCpf(e.target.value)} /> </Col> </Row> <ModalFooter> <Button onClick={() => { submitvalue(); aceitarTce(); }} block variant="tangerine" > Aceitar </Button> </ModalFooter> </Form> </ModalContent> ); }

El botón es a cambio de la función predeterminada de exportación, donde se inserta la función asíncrona.

 return ( <Controles> {showControlls && ( <> <Button variant="tangerine" onClick={() => Formulario()} loading={loading || undefined} > Li, concordo e aceito </Button> <Button onClick={recusarTce} loading={loading || undefined}> Recusar o contrato </Button> </> )}

He probado de varias formas y no he podido, pido ayuda a alguien. Código realizado en react.js y javascript, con backend en PHP y framework Slim.

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!