
Andrés Fernández
PreguntaMi formulario no funciona. El botón submit no hace nada por lo tanto, tampoco activa ningún aviso de required 😦
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Formulario-2</title> </head> <body> <main> <form action=""> <label for="nombre"> <span>¿Cuál es tu nombre?</span> <input type="text" name="nombre" id="nombre" autocomplete="name" required /> </label> <label for="correo"> <span>¿Cuál es tu correo?</span> <input type="email" name="correo" id="correo" autocomplete="email" required /> </label> <label for="pais"> <span>¿En que país vives?</span> <input type="text" name="pais" id="pais" autocomplete="country" required /> </label> <label for="cp"> <span>¿Cuál es tu código postal?</span> <input type="text" name="cp" id="cp" autocomplete="postal-code" required /> </label> </form> <input type="submit" /> </main> </body> </html>```
Francisco Javier Solis Vera
<button>type="submit" class="enviar">Enviar Formulario</button> </form>

Luis Leiva
Tambien debes separas el input de type asi <input type="submit" /> Si lo dejo pegado a mi no me funciona

Andrés Fernández
Ahí está...! 😅 Muchas gracias.

John Cardenas
Hola @anferben,
El botón está fuera de la etiqueta form
</form> <input type="submit" />
Debe ir dentro
<input type="submit" /> </form>
De resto, todo está muy bien. Con ese cambio ya te debería funcionar.