Radio button or combo on contactus

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 anni tempo fa
Hi, i am trying to make the contactus page to have a radio button or combo in order to send the notifications for differents emails according to the selection, is possible to do it? how?
Thnaks
6 anni tempo fa
This is pretty simple.

Open up your /Views/Common/ContactUs.cshtml in notepad.

Look for this code:

                        @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>

                        }


You will change the part that I bolded/italicized to something like this:

                            <div class="inputs">
                                @Html.LabelFor(model => model.Subject)
        <select class="form-control" data-val="true" name="subject">
          <option value="-----">Please select one</option>
          <option value="QuoteRequest">Requesting a Quote</option>
          <option value="Employment">Seeking Employment</option>
          <option value="MarketingAdvertising">Marketing/Advertising</option>
          <option value="OtherReason">Other Reason</option>
        </select>
                                @Html.RequiredHint()
                                @Html.ValidationMessageFor(model => model.Subject)
                            </div>


This ONLY changes the subject in the email...not the routing.
You must use Content Filters in your mail server settings to route the emails to different addresses based on the subject. This is pretty easy to do. You can also configure Rules within your mail server settings to automatically forward the email to a different email address and/or to be saved in a special folder in your mail client..
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.