Uncheck "Send email notification for responses to" setting
Hello,
Under the settings for a Sitefinity form, there are 2 checked boxes under the "Send email notification for responses to..." section. After checking the "List of email address.." and entering one email address, I am now unable to uncheck or remove the email from the settings any more.
I am able to remove or add more email addresses to the list, but I cannot remove all of the emails.
I have tried many combinations of settings to try to keep it unchecked. But when I go back to the settings, it's the same as before.
Thanks.
=================
Sitefinity Version: 8.2.5900.0
Hello,
This is a known issue which we have logged in our feedback portal on the following link:
http://feedback.telerik.com/Project/153/Feedback/Details/185708-unable-to-uncheck-the-list-of-email-addresses-checkbox-in-form-edit-and-disable-n
You can subscribe to receive notifications for the bug including new comments, votes, status changes by clicking on the "Follow this item" link. If you would like to unsubscribe, you can unfollow the item by removing "Following this item”.
As a workaround, if users do not want to receive notifications on form submissions, they can unsubscribe themselves by clicking on the Actions link of specified form and then select Unsubscribe.
Another approach is to unsubscribe the users using the API. Here is a sample code for your reference for unsubscribing users who have subscribed for form responses by passing the form name:
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Telerik.Sitefinity.Forms.Model;
using
Telerik.Sitefinity.Modules.Forms;
using
Telerik.Sitefinity.Services;
using
Telerik.Sitefinity.Services.Notifications;
namespace
SitefinityWebApp
public
partial
class
UnsubscribeFormSubscribers : System.Web.UI.Page
protected
void
Page_Load(
object
sender, EventArgs e)
// the name of your form under Content -> Forms -> <your form> -> form's Actions link -> Properties -> Name used in code (for developers) field
string
formName =
"sf_testform"
;
var formManager = FormsManager.GetManager();
var form = formManager.GetForms().Where(f => f.Name == formName).SingleOrDefault();
var subscriptionListId = form.SubscriptionListId;
var notificationService = SystemManager.GetNotificationService();
var serviceContext =
new
ServiceContext(
"ThisApplicationKey"
, formManager.ModuleName);
List<ISubscriberResponse> formSubscribers = notificationService.GetSubscribers(serviceContext, subscriptionListId,
new
QueryParameters()).ToList();
foreach
(var subscriber
in
formSubscribers)
notificationService.Unsubscribe(serviceContext, subscriptionListId, subscriber.Id);