Umbraco login form macro, form action wrong?
# help-with-umbraco
u
I took the macro for login form.
Copy code
@using (Html.BeginUmbracoForm<UmbLoginController>(
        "HandleLogin", new { RedirectUrl = loginModel.RedirectUrl })) {

            <h4>Log in with a local account.</h4>
            <hr />
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <div class="mb-3">
                <label asp-for="@loginModel.Username" class="form-label"></label>
                <input asp-for="@loginModel.Username" class="form-control" />
                <span asp-validation-for="@loginModel.Username" class="form-text text-danger"></span>
            </div>
            <div class="mb-3">
                <label asp-for="@loginModel.Password" class="form-label"></label>
                <input asp-for="@loginModel.Password" class="form-control" />
                <span asp-validation-for="@loginModel.Password" class="form-text text-danger"></span>
            </div>
            <div class="mb-3 form-check">
                <input asp-for="@loginModel.RememberMe" class="form-check-input">
                <label asp-for="@loginModel.RememberMe" class="form-check-label">
                    @Html.DisplayNameFor(m => loginModel.RememberMe)
                </label>
            </div>

            <button type="submit" class="btn btn-primary">Log in</button>


        }
But the form action just ends up being the page I currently is sat at, instead of the correct UmbLoginController action. Why is that? Cant seem to debug it at all.
y
Hello @.netzone , I have same for the register, But I create my own Controller and I copped the same register code from the "UmbRegisterController" , also for the login I did the same. Why it is Cant debug it at all? Because it is a static code also build in code, For that you can not. I create a register macro after that I took the code , Also I create Controller and I copped the same ode of the Umbraco Controller.
5 Views