0
People needed to do the following I have a page made in pure html and in it I have an area where the user can put his email and ask to register it. Ai wanted to take this email from inoput text and in the post direct to another page where I get the received string and the handle in the controller. but I am not succeeding in including the input value in my url.
<form>
<section class="call-to-action text-white text-center">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-xl-9 mx-auto">
<h2 class="mb-4">Quer receber as melhores ofertas dos nossos parceiros? Cadastre-se abaixo!</h2>
</div>
<div class="col-md-10 col-lg-8 col-xl-7 mx-auto">
<form>
<div class="form-row">
<div class="col-12 col-md-9 mb-2 mb-md-0">
<input type="email" id="email" name="email" class="form-control form-control-lg" placeholder="Digite seu melhor email...">
</div>
<div class="col-12 col-md-3">
<button type="submit" id="enviar" formmethod="post" formaction="../Home/GetEmail/?email=document.getElementById('email').value" class="btn btn-block btn-lg btn-primary">Cadastrar!</button>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
</form>
but when redirecting is like this:
http://localhost:64073/Home/Getemail/? email=Document.getElementById(%27email%27). value
Maybe my way of concatenating is wrong. Some id~How to solve this?
See if adding the attribute
action="../Home/GetEmail/
in histag form
solves your problem.– Benilson