How to add more fields to contact us page in nop commerce?

207 Views Asked by At

How can I add more fields to "contact us" form in nop commerce? I'm new to nop commerce.

I added a field to ContactUs.cshtml but nothing is showing on my side when I load the form.

I have added the Postal Address but it doesn't show

                
                <div class="fieldset">
                    <div class="form-fields">
                        <div class="inputs">
                            @Html.LabelFor(model => model.FullName)
                            @Html.TextBoxFor(model => model.FullName, new { @class = "fullname", placeholder = T("ContactUs.FullName.Hint") })
                            @Html.RequiredHint()
                            @Html.ValidationMessageFor(model => model.FullName)
                        </div>
      
      <div class="inputs">
                            @Html.LabelFor(model => model.PostalAddress)
                            @Html.TextAreaFor(model => model.PostalAddress, new { @class = "postaladdress", placeholder = T("ContactUs.PostalAddress.Hint") })
                            @Html.RequiredHint()
                            @Html.ValidationMessageFor(model => model.PostalAddress)
                        </div>
      
                        <div class="inputs">
                            @Html.LabelFor(model => model.Email)
                            @Html.TextBoxFor(model => model.Email, new { @class = "email", placeholder = T("ContactUs.Email.Hint") })
                            @Html.RequiredHint()
                            @Html.ValidationMessageFor(model => model.Email)
                        </div>
                        @if (Model.SubjectEnabled)
                        {
                            <div class="inputs">
                                @Html.LabelFor(model => model.Subject)
                                @Html.TextBoxFor(model => model.Subject, new { @class = "subject", placeholder = T("ContactUs.Subject.Hint") })
                                @Html.RequiredHint()
                                @Html.ValidationMessageFor(model => model.Subject)
                            </div>
                        }
                        <div class="inputs">
                            @Html.LabelFor(model => model.Enquiry)
                            @Html.TextAreaFor(model => model.Enquiry, new { @class = "enquiry", placeholder = T("ContactUs.Enquiry.Hint") })
                            @Html.RequiredHint()
                            @Html.ValidationMessageFor(model => model.Enquiry)
                        </div>
                        @if (Model.DisplayCaptcha)
                        {
                            <div class="captcha-box">
                                @Html.Raw(Html.GenerateCaptcha())
                            </div>
                        }
                    </div>
                </div>
                <div class="buttons">
                    <input type="submit" name="send-email" class="button-1 contact-us-button" value="@T("ContactUs.Button")" />
                </div>
            }
        }
  

1

There are 1 best solutions below

0
On

If you are using a theme you should edit the view under the folder "Themes>NameOfYourTheme>WhatEverView" and not the one directly under the "views" folder.

Check if that is the reason.