-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Se creo un script al final con una funcion de validacion para el nombre
- Loading branch information
Showing
1 changed file
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,9 @@ | |
<h2 class="form-text-title">Formulario de registro</h2> | ||
<p class="form-text-p">Completa los campos para suscribirte:</p> | ||
|
||
<form class="form-text form-content" action="https://formspree.io/f/xoqgpdyk" method="post"> | ||
<form class="form-text form-content" action="https://formspree.io/f/xoqgpdyk" method="post" onsubmit="return validacion()"> | ||
<label class="label-register" for="nombre">Nombre:</label> | ||
<input type="text" class="input-register" name="nombre" placeholder="Ingrese nombre..."><br><br> | ||
<input type="text" class="input-register" name="nombre" id="nombre" placeholder="Ingrese nombre..."><br><br> | ||
<label class="label-register" for="apellido">Apellido:</label> | ||
<input type="text" class="input-register" name="apellido" placeholder="Ingrese apellido..."><br><br> | ||
<label class="label-register label-date" for="fecha_de_nacimiento">Fecha de nacimiento:</label> | ||
|
@@ -103,7 +103,18 @@ <h3 class="title-footer">Follow Us</h3> | |
|
||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> | ||
|
||
<script> | ||
function validacion(){ | ||
valor = document.getElementById("nombre").value; | ||
if (valor == null || valor.length == 0){ | ||
document.getElementById("mensaje").innerHTML = "Tenes que completar el nombre!"; | ||
elemento = document.getElementById("nombre"); | ||
elemento.focus(); | ||
return false; | ||
} | ||
return true; | ||
} | ||
</script> | ||
</body> | ||
</html> | ||
|
||
|