• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

213
Vistas
Form submit does not close the form and reload to the homepage

I have a problem setting up a form on my website. I want to add two separate forms on my website, which i did, using some HTML & css. Thoses forms need to send informations to a webhook -> it also works (since it's collected) BUT as soon as i press submit, it redirect to the main page of the website, so no conversion (which is a shame) and a very bad input from me. Please, lend me your intelligence, since i must be the best idiot there is.

<form name='myForm' data-form-id='IdFromWebhook' action='WebhookLink' method='post' onsubmit="return false">
<div class="row">
  <div class="col-lg-12">
     <div class="form-group text_box">
        <label for='EMAIL_ADDRESS'>E-mail: </label><input id='insightly_email' name='email' type='text' required>
     </div>
  </div>
    <div class="col-lg-6">
     <div class="form-group text_box">
            <label for='FIRST_NAME'>First name: </label><input id='insightly_firstName' name='firstName' type='text' required>
     </div>
  </div>
    <div class="col-lg-6">
     <div class="form-group text_box">
            <label for='LAST_NAME'>Last Name: </label><input id='insightly_lastName' name='lastName' type='text' required>
     </div>
  </div>
  
    <div class="col-lg-4">
     <div class="form-group text_box">
<label for='Language__c'>Choose a language: </label>
<select id='insightly_language' name='language' required><option value='EN'>EN</option><option value='FR'>FR</option><option value='DE'>DE</option></select>
     </div>
  </div>
</div>
<!--Bouton d'envoi-->
<div style="display:flex;justify-content:center"><input class="btn_three" type='submit' value='Submit'></div></form>
almost 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use event.preventDefault() this will stops redirect:

formReference.onsubmit = (event) => {
  event.preventDefualt()
}
almost 3 years ago · Juan Pablo Isaza Denunciar
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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda