1
I have a page with a form made with Bootstrap and would need to recover the data submitted to a Javascript file external to HTML.
My main goal would be to retrieve the password field to make validations through the function ValidarSenha()
.
Thank you for your attention.
Follow the HTML code
<div class="col-sm-3">
<form name="cadastro" class="form-set" action="/pagina-destino" onsubmit="return ValidaSenha()" method="post">
<div class="form-group">
<label for="nome">Nome</label>
<input type="text" class="form-control" id="nome" name="nome" placeholder="ex: João da Silva"/>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" name="email" placeholder="ex: [email protected]"/>
</div>
<div class="form-group">
<label for="senha">Senha</label>
<input type="password" class="form-control" id="senha" name="senha"/>
</div>
<div class="form-group">
<label for="csenha">Confirme sua senha</label>
<input type="password" class="form-control" id="csenha" name="csenha"/>
</div>
<button type="submit" class="btn btn-warning">Enviar</button>
</form>
</div>
It is not very clear what exactly you are trying to do. Where do you need to use the data ? How do you want to use it ? What is the location of the file you want to use ? This file is JS or PHP ?
– Isac