Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
Button execute a form in another function in react

I need the Formulario() function to be opened by the "Eu li, concordo e aceito" button.

  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>
    );
  } 

The button is in return for the export default function, where the async function is inserted.

  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>
          </>
        )}

I've tried several ways and I couldn't, I ask for someone's help. Code made in react.js and javascript, with backend in PHP and Slim framework.

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda