• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

139
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.

almost 3 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
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error