we have nopcommerce 3.90
i use guest checkout and I want to disable some required fields in billing address
i found this code in \Views\Shared\_CreateOrUpdateAddress.cshtml
@if (Model.CountryEnabled)
{
<div class="inputs">
@Html.LabelFor(model => model.CountryId, new { }, ":")
@Html.DropDownListFor(model => model.CountryId, Model.AvailableCountries)
@Html.RequiredHint()
@Html.ValidationMessageFor(model => model.CountryId)
</div>
}
@if (Model.ZipPostalCodeEnabled)
{
<div class="inputs">
@Html.LabelFor(model => model.ZipPostalCode, new { }, ":")
@Html.EditorFor(model => model.ZipPostalCode)
@if (Model.ZipPostalCodeRequired)
{
@Html.RequiredHint()
}
@Html.ValidationMessageFor(model => model.ZipPostalCode)
</div>
}
is there any code to disable required fields? i mean disable field validation
PS: I know that I can disable it in admin panel, but I need to do it in code... or I need to disable in admin panel, but show them in shipping address