如何在nop commerce中添加更多字段来联系我们页面?

时间:2017-10-02 08:56:01

标签: sql asp.net nopcommerce nopcommerce-3.90

如何在nop commerce中为“联系我们”表单添加更多字段?我是nop commerce的新手。

我在ContactUs.cshtml添加了一个字段,但在我加载表单时没有显示任何内容。

我添加了邮政地址,但没有显示

                
                <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 个答案:

答案 0 :(得分:0)

如果您使用的是主题,则应编辑文件夹&#34; Themes&gt; NameOfYourTheme&gt; WhatEverView&#34;而不是直接在&#34;观点&#34;文件夹中。

检查是否是原因。