Posted on 12/10/2023 14:54:05
6 years later and I still find myself spending way too much time doing a simple newsletter sign up form. I have the Extranet app with these settings:
Show: Create profile / Manage subscription
And this code:
@foreach (var error in GetLoop("FormValidationErrors"))
{
<div class="alert alert-danger mb-3" role="alert">
@error.GetString("UserManagement:User.FormValidationError.Message")
</div>
}
@GetString("UserManagement:User.FormStart")
<input type="hidden" name="UserManagementForm" value="1">
<label class="form-label fs-7 mb-0 opacity-75">@Translate("Your email")</label>
<input type="email" class="form-control placeholder="@Translate("Email")" name="UserManagement_Form_Email" id="UserManagement_Form_Email" value="@GetString("UserManagement:User.Email")" required />
<label class="form-label fs-7 mb-0 opacity-75">@Translate("First name")</label>
<input type="text" id="CustomerFirstName" class="form-control" placeholder="@Translate("First name")" name="UserManagement_Form_FirstName" value="@GetString("UserManagement:User.FirstName")" required onchange="updateFullName();" />
<label class="form-label fs-7 mb-0 opacity-75">@Translate("Last name")</label>
<input type="text" id="CustomerLastName" class="form-control" placeholder="@Translate("Last name")" name="UserManagement_Form_LastName" value="@GetString("UserManagement:User.LastName")" required onchange="updateFullName();" />
<label><input type="checkbox" name="OptInCategory" value="" required /> @Translate("I consent to be included in your email database")</label>
<button type="submit" class="btn btn-primary btn-lg" id="CreateNewAccountButton">@Translate("Sign up")</button>
@GetString("UserManagement:User.FormEnd")
Yet when I submit, I get this:
My email is not empty! And I do not what to supply a password as I am just signing up a user?
What to do?
Imar