Zum Ende der Metadaten springen
Zum Anfang der Metadaten

Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

Version 1 Nächste Version anzeigen »

This tutorial will show you how to set up deadlines to delete contact requests of an entry automaticaly after the deadline is reached.

If you haven't already done it, install and setup your project. You can use the umkickstarter.

Continue with creating a new Contact Form instance.

Creating a new Contact Form instance

Go to Tools/Apps/Contact Form and create a new instance:

Enter an appropriate Title.

Select Englisch as the Used language.

Go to settings and select Automatically delete contact requests after deadline

You can choose between the options Delete contact requests after deadline and Delete fixed date contact requests.

While the first option ensures that the request is deleted in x days, weeks, months or years, the second ensures that requests with this time stamp will be deleted when this timestamp has already been reached.

For our purpose, select Delete fixed date contact requests and enter today's date and the current time.

Go to Contact form and deselect Send contact to agent by e-mail.

Enter the URL of the REST proxy.

Copy the Copy template to your clipboard, Save and Release the app instance and paste the copy template onto your website.

Send a contact request

Call the contact form in your web browser and send some dummy contact requests.

This will create a new table row in the contacts table of a (n new) entry. Among other things, the attribute c_deletion_date ist set to the timestamp set up in the Contact Form instance.

Run Job to clean up tables

Go to Tools/Jobs and display the ContactForm 2 Cleanup Tables job through the eye symbol.

Usually this job should run automatically. In this case you would like to see some results immediately, so click on Run now to run it and open the output.log after the job is finished.

The log should look something like this.

It shows all contact requests which were made before the deadline c_deletion_date (you set up in Step 1) run out of date.

Later on, you may need to check up this process for some reason. All deletions are although logged into the HistoryLog. Go to Tools/History Log.

Fill out the search form and run it by clicking the loop-Button:

Search → contactform2-cleanup-tables

All areas → Jobs

All actions → Execute

All areas → EditUser

Actions → Delete

Open the details view to see the log file of this job.

It may be possible that a user was deleted as well while running this job.

Look for User Job contactform2-cleanup-tables. 

  • Keine Stichwörter