diff --git a/wcs/admin/forms.py b/wcs/admin/forms.py
index 3463647..6d36fd9 100644
--- a/wcs/admin/forms.py
+++ b/wcs/admin/forms.py
@@ -27,6 +27,7 @@ try:
 except ImportError:
     M2Crypto = None
 
+import datetime
 import tarfile
 import time
 from cStringIO import StringIO
@@ -206,8 +207,8 @@ class WorkflowRoleDirectory(Directory):
 
 class FormDefPage(Directory):
     _q_exports = ['', 'fields', 'delete', 'duplicate', 'export',
-                  'archive', 'invite', 'enable', 'workflow', 'category',
-                  'role', ('workflow-options', 'workflow_options'),
+                  'anonymise', 'archive', 'invite', 'enable', 'workflow',
+                  'category', 'role', ('workflow-options', 'workflow_options'),
                   ('workflow-status-remapping', 'workflow_status_remapping'),
                   'roles', 'title', 'options', ('acl-read', 'acl_read')]
 
@@ -386,6 +387,7 @@ class FormDefPage(Directory):
         r += htmltext('<li><a href="duplicate">%s</a></li>') % _('Duplicate')
         if ET:
             r += htmltext('<li><a href="export">%s</a></li>') % _('Export')
+        r += htmltext('<li><a href="anonymise">%s</a></li>') % _('Anonymise handled forms')
         if not (get_publisher().has_site_option('postgresql') and get_cfg('postgresql', {})):
             r += htmltext('<li><a href="archive">%s</a></li>') % _('Archive')
         if self.formdef.roles:
@@ -847,6 +849,110 @@ class FormDefPage(Directory):
             'attachment; filename=%s-archive.wcs' % self.formdef.url_name)
         return job.file_content
 
+    def anonymise(self):
+        all_forms = self.formdef.data_class().select()
+        for formdata in all_forms:
+            if not formdata.anonymised:
+                formdata.anonymise()
+        if get_request().form.get('job'):
+            return self.anonymise_processing()
+
+        endpoints = []
+        for status in self.formdef.workflow.get_endpoint_status():
+            endpoints.append((status.id, status.name))
+
+        form = Form(enctype='multipart/form-data')
+
+        form.widgets.append(HtmlWidget('<p>%s</p>' % _(
+            "You are about to irrevocably anonymise forms which are closed.")))
+
+
+        form.add(DateWidget, 'before_request_date',
+                title=_('Requests ended before'),
+                value=datetime.date.today() - datetime.timedelta(30),
+                required=True)
+        form.add(CheckboxesWidget, 'endpoints', title=_('Status of the requests to anonymise'),
+                value=[endpoint[0] for endpoint in endpoints],
+                elements=endpoints,
+                inline=False,
+                required=True)
+
+        form.add_submit('submit', _('Submit'))
+        form.add_submit('cancel', _('Cancel'))
+
+        if form.get_widget('cancel').parse():
+            return redirect('.')
+
+        if not form.is_submitted() or form.has_errors():
+            get_response().breadcrumb.append(('anonymise', _('Anonymise')))
+            html_top('forms', title=_('Anonymise Forms'))
+            r = TemplateIO(html=True)
+            r += htmltext('<h2>%s</h2>') % _('Anonymise Forms')
+            r += form.render()
+            return r.getvalue()
+        else:
+            return self.anonymise_submit(form)
+
+    def anonymise_submit(self, form):
+
+        class Anonymiser:
+
+            def __init__(self, formdef, status_ids, before_date):
+                self.formdef = formdef
+                self.status_ids = ["wf-%s" % id for id in status_ids]
+                self.before_date = before_date
+
+            def anonymise(self, job=None):
+                all_forms = self.formdef.data_class().select()
+                all_forms = [x for x in all_forms if x.status in self.status_ids]
+                all_forms = [x for x in all_forms if (
+                    x.evolution and x.evolution[-1].time < self.before_date) or (
+                    x.receipt_time < self.before_date)]
+                for formdata in all_forms:
+                    if not formdata.anonymised:
+                        formdata.anonymise()
+
+        before_date = form.get_widget('before_request_date').parse()
+        before_date = time.strptime(before_date, misc.date_format())
+        status_ids = form.get_widget('endpoints').parse()
+        count = self.formdef.data_class().count()
+        anonymiser = Anonymiser(self.formdef, status_ids, before_date)
+        if count > 100: # Arbitrary threshold
+            job = get_response().add_after_job(
+                str(N_('Anonymising forms')),
+                anonymiser.anonymise)
+            return redirect('anonymise?job=%s' % job.id)
+        else:
+            anonymiser.anonymise()
+
+        return redirect('.')
+
+    def anonymise_processing(self):
+        try:
+            job = AfterJob.get(get_request().form.get('job'))
+        except KeyError:
+            return redirect('.')
+
+        html_top('forms', title=_('Anonymising'))
+        r = TemplateIO(html=True)
+        r += get_session().display_message()
+        get_response().add_javascript(['jquery.js', 'afterjob.js'])
+        r += htmltext('<dl class="job-status">')
+        r += htmltext('<dt>')
+        r += _(job.label)
+        r += htmltext('</dt>')
+        r += htmltext('<dd>')
+        r += htmltext('<span class="afterjob" id="%s">') % job.id
+        r += _(job.status)
+        r += htmltext('</span>')
+        r += htmltext('</dd>')
+        r += htmltext('</dl>')
+
+        r += htmltext('<div class="done">')
+        r += htmltext('<a href="./">%s</a>') % _('Back')
+        r += htmltext('</div>')
+        return r.getvalue()
+
     def invite(self):
         if not self.formdef.roles:
             return template.error_page(
diff --git a/wcs/fields.py b/wcs/fields.py
index 6348ec5..acd9485 100644
--- a/wcs/fields.py
+++ b/wcs/fields.py
@@ -115,6 +115,7 @@ class Field:
     prefill = None
     store_display_value = None
 
+    anonymise = True
     stats = None
 
     def __init__(self, **kwargs):
@@ -551,6 +552,7 @@ class BoolField(WidgetField):
 
     widget_class = CheckboxWidget
     required = False
+    anonymise = False
 
     def perform_more_widget_changes(self, form, kwargs, edit = True):
         if not edit:
@@ -630,6 +632,7 @@ class FileField(WidgetField):
     key = 'file'
     description = N_('File Upload')
 
+    anonymise = False
     widget_class = FileWithPreviewWidget
 
     def get_view_value(self, value):
@@ -762,6 +765,7 @@ class ItemField(WidgetField):
 
     items = []
     show_as_radio = False
+    anonymise = False
     widget_class = SingleSelectHintWidget
     data_source = {}
 
@@ -1365,6 +1369,7 @@ class RankedItemsField(WidgetField):
     items = []
     randomize_items = False
     widget_class = RankedItemsWidget
+    anonymise = False
 
     def perform_more_widget_changes(self, form, kwargs, edit = True):
         kwargs['elements'] = self.items or []
diff --git a/wcs/formdata.py b/wcs/formdata.py
index a7b19e6..1ab656e 100644
--- a/wcs/formdata.py
+++ b/wcs/formdata.py
@@ -15,6 +15,7 @@
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 import copy
+import datetime
 import json
 import time
 
@@ -130,6 +131,7 @@ class FormData(StorableObject):
     user_hash = None
     receipt_time = None
     status = None
+    anonymised = None
     page_no = None # page to use when restoring from draft
     evolution = None
     data = None
@@ -441,6 +443,26 @@ class FormData(StorableObject):
 
         return status_action_roles
 
+    def anonymise(self):
+        for field in self.formdef.fields:
+            if field.anonymise:
+                self.data[field.id] = None
+
+        self.anonymised = datetime.datetime.now()
+        self.user_id = None
+        self.user_hash = None
+        self.editable_by = None
+        self._signature = None
+        self.workflow_data = None
+        self.workflow_roles = None
+
+        for evo in self.evolution:
+            evo.who = None
+            evo.parts = None
+            evo.comment = None
+            evo.parts = None
+        self.store()
+
     def export_to_json(self):
         data = {}
         data['id'] = '%s/%s' % (self.formdef.url_name, self.id)
diff --git a/wcs/sql.py b/wcs/sql.py
index d3801e8..aa5bf0d 100644
--- a/wcs/sql.py
+++ b/wcs/sql.py
@@ -112,6 +112,7 @@ def do_formdef_tables(formdef):
                                     user_id varchar,
                                     user_hash varchar,
                                     receipt_time timestamp,
+                                    anonymised timestamptz,
                                     status varchar,
                                     page_no varchar,
                                     workflow_data bytea,
@@ -131,7 +132,7 @@ def do_formdef_tables(formdef):
 
     needed_fields = set(['id', 'user_id', 'user_hash', 'receipt_time',
         'status', 'workflow_data', 'id_display', 'fts', 'page_no',
-        'workflow_roles', 'workflow_roles_array'])
+        'anonymised', 'workflow_roles', 'workflow_roles_array'])
 
     # migrations
     if not 'fts' in existing_fields:
@@ -147,6 +148,9 @@ def do_formdef_tables(formdef):
     if not 'page_no' in existing_fields:
         cur.execute('''ALTER TABLE %s ADD COLUMN page_no varchar''' % table_name)
 
+    if not 'anonymised' in existing_fields:
+        cur.execute('''ALTER TABLE %s ADD COLUMN anonymised timestamptz''' % table_name)
+
     # add new fields
     for field in formdef.fields:
         assert field.id is not None
@@ -449,6 +453,7 @@ class SqlFormData(SqlMixin, wcs.formdata.FormData):
         ('receipt_time', 'timestamp'),
         ('status', 'varchar'),
         ('page_no', 'varchar'),
+        ('anonymised', 'timestamptz'),
         ('workflow_data', 'bytea'),
         ('id_display', 'varchar'),
         ('workflow_roles', 'bytea'),
@@ -506,6 +511,7 @@ class SqlFormData(SqlMixin, wcs.formdata.FormData):
                 'page_no': self.page_no,
                 'workflow_data': bytearray(cPickle.dumps(self.workflow_data)),
                 'id_display': self.id_display,
+                'anonymised': self.anonymised,
         }
         if self.receipt_time:
             sql_dict['receipt_time'] = datetime.datetime.fromtimestamp(time.mktime(self.receipt_time)),
