This article goes over GDPR considerations when it comes to Ektron HTML Forms.
The form submission information is not stored in the database encrypted nor is there something out of the box for that. APIs can be used to delete submitted form data. Relevant tables also included for reference.
Below is a sample API page to purge form data which can be modified for respective needs.
<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
Ektron.Cms.Framework.Content.FormManager fManager = new Ektron.Cms.Framework.Content.FormManager();
Ektron.Cms.Common.FormCriteria criteria = new Ektron.Cms.Common.FormCriteria();
criteria.AddFilter(Ektron.Cms.Common.FormProperty.Id, Ektron.Cms.Common.CriteriaFilterOperator.GreaterThan, 0);
criteria.PagingInfo = new Ektron.Cms.PagingInfo(100000);
var formList = fManager.GetList(criteria);
if(formList.Count > 0)
{
formIdList.Items.Add(new ListItem("Please select a form from the list", "0"));
foreach (var item in formList)
{
formIdList.Items.Add(new ListItem(item.Title, item.Id.ToString()));
}
}
}
}
protected void delete_Click(object sender, EventArgs e)
{
try
{
long formID = long.Parse(formIdList.SelectedValue);
DateTime purgeDate = DateTime.Parse(purgedate.Value);
if (formID > 0 && purgeDate > DateTime.Now.AddYears(-20))
{
Ektron.Cms.Framework.Content.FormManager fManager = new Ektron.Cms.Framework.Content.FormManager();
Ektron.Cms.Common.FormSubmittedCriteria criteria = new Ektron.Cms.Common.FormSubmittedCriteria();
criteria.AddFilter(Ektron.Cms.Common.FormSubmittedProperty.FormDataId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, formID);
criteria.AddFilter(Ektron.Cms.Common.FormSubmittedProperty.DateSubmitted, Ektron.Cms.Common.CriteriaFilterOperator.GreaterThanOrEqualTo, purgeDate);
criteria.PagingInfo = new Ektron.Cms.PagingInfo(1000000);
var data = fManager.GetSubmittedFormList(criteria);
Ektron.Cms.Modules.EkModule module = new Ektron.Cms.Modules.EkModule();
if (data.Count > 0)
{
foreach (var item in data)
{
var success = module.PurgeFormData(formID, item.Id);
}
}
}
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Purge Form Data</title>
<script src="https://code.jquery.com/jquery-3.0.0.min.js" integrity="sha256-JmvOoLtYsmqlsWxa7mDSLMwa6dZ9rrIdtrrVYRnDRH0="
crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js" integrity="sha256-xNjb53/rY+WmG+4L6tTl9m6PpqknWZvRt0rO1SRnJzw="
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"
crossorigin="anonymous">
<script type="text/javascript">
$(document).ready(function () {
$(".datecontrol").datepicker({
changeMonth: true,
changeYear: true
});
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h3>Purge Form Data</h3>
</div>
</div>
<div class="row">
<div class="col-md-12">
Form ID:
<asp:DropDownList ID="formIdList" runat="server"></asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-md-12">
Date to start the purge:
<input type="datetime" runat="server" id="purgedate" class="datecontrol form-control" />
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:Button ID="delete" runat="server" Text="Purge Data" OnClick="delete_Click" CssClass="btn btn-primary" />
</div>
</div>
</div>
</form>
</body>
</html>
Please sign in to leave a comment.