How do i remove email required validation from Shipping Address? Please help me...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 9 años
How do i remove email required validation  from Shipping Address? Please help me...
Hace 9 años
I have same question. I think need to put into @Html.EditorFor(model => model.Email) some default value and hide this label. But I don't know how to do this(
Hace 9 años
Actually Shipping email is not used to notify anything.
So i commented shipping email validation code in ordercreation code.
Hace 9 años
Or Best way is to create separate model ,view and controller for shipping address and remove email address from shipping address.
Hace 9 años
<div class="inputs" style="display: none;">
        @Html.LabelFor(model => model.Email, new { }, ":")
              @Html.TextBoxFor(model => model.Email, new { Value = T("[email protected]") })
        @Html.RequiredHint()
        @Html.ValidationMessageFor(model => model.Email)
    </div>


That's it!
Yes new model and validating is better, but this way is faster) But in my case I need to remove email from everywhere, not only from shipping Address
Hace 9 años
yes that is also quick solution
Hace 9 años
[quote=shvager87]
<div class="inputs" style="display: none;">
        @Html.LabelFor(model => model.Email, new { }, ":")
              @Html.TextBoxFor(model => model.Email, new { Value = T("[email protected]") })
        @Html.RequiredHint()
        @Html.ValidationMessageFor(model => model.Email)
    </div>


Where do you make this change (for those programmers less apt as myself)? Please spell it out in simple steps. This method will not remove the email field from the billing address right? I need to have their email address, I just don't want them to have to put it in twice if they have a different billing and shipping address.
Thanks in advance.

Ryan Parks
Hace 8 años
shvager87 wrote:
<div class="inputs" style="display: none;">
        @Html.LabelFor(model => model.Email, new { }, ":")
              @Html.TextBoxFor(model => model.Email, new { Value = T("[email protected]") })
        @Html.RequiredHint()
        @Html.ValidationMessageFor(model => model.Email)
    </div>


That's it!
Yes new model and validating is better, but this way is faster) But in my case I need to remove email from everywhere, not only from shipping Address


I know this is an old thread, but I have a situation where we are processing many orders that are phoned in, and the customers are unwilling to provide their email address. Rather than be required to input a bogus email address for those phone orders, I'd like my employees to be able to skip that field altogether.

I'd like to be able to do something like you have done, (using CSS to hide the field) but only when the current user is in Admin role.

What I'm wondering is this....is the "isAdmin" variable exposed during registration/checkout? Or is there a variable that indicates the ACL role of the visitor which I could check for during registration/checkout?

Even better would be the ability to just remove the "required" validation based on customer role..possible?

Thanks,
Steve
Hace 8 años
Not sure why, but I can't edit my post...so here is a follow-up question:

Or maybe it is possible to just determine during registration/checkout whether an "impersonation" session is active?
Hace 6 años
We need other folks that require this enhancement to speak up..upvote my post and the work item at Github!!
https://github.com/nopSolutions/nopCommerce/issues/1534
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.