At the moment I have 2 forms. Login form and Registration form. I use Javascript Toggle to switch between them. But now I want to add a 3th form. How can I do this? So I want to be able to switch from Login form to Register form OR to Forgot Password form and from those 2 back to Login form.
Here you see how I did it now in my View:
(The only thing in my partial views is a form with a a tag at the bottom to activate .js code)
<div class="login-page">
<div class="form">
<!--Login Form-->
@{await Html.RenderPartialAsync("_LoginView"); }
<!--Register Form-->
@{await Html.RenderPartialAsync("_RegisterView"); }
</div>
</div>
And my .js file:
//Toggle between login and registration form
$('.switch a').click(function () {
$('form').animate({ height: "toggle", opacity: "toggle" }, "slow");
});
And the .css code:
.register-form {
display: none;
}