Contact form

Theodoulos Iacovou asked on February 28, 2020 08:27

I have a built a contact form and I want the recorder data to be automatically deleted on the 1st of the year.Any suggestion please?

Correct Answer

Arjan van Hugten answered on February 28, 2020 11:04

You can just follow the custom scheduling task documentation. You need to create a custom class library project. There you can create the task. After referencing the project to your kentico webapp project you can create a new custom scheduled task in the CMS interface. https://docs.kentico.com/k12sp/configuring-kentico/scheduling-tasks/scheduling-custom-tasks

In the schedulded task you can check if the date of the form data record is in previous year, and delete the record if this is the case.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Arjan van Hugten answered on February 28, 2020 10:12

I think this could be done by creating a custom scheduled task in which you delete the form data you want to delete.

https://docs.kentico.com/k12sp/configuring-kentico/scheduling-tasks/scheduling-custom-tasks

https://docs.kentico.com/api12sp/content-management/form-data

0 votesVote for this answer Mark as a Correct answer

Theodoulos Iacovou answered on February 28, 2020 10:30 (last edited on February 28, 2020 10:31)

Arjan van Hugten , by the scheduling i will set date to delete the form data?

0 votesVote for this answer Mark as a Correct answer

Theodoulos Iacovou answered on February 28, 2020 10:49

Any instructions of where i must add the task code? https://docs.kentico.com/api12sp/content-management/form-data

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.