PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How to limit the time that entries are retained?

  1. Anonymous
    Unregistered

    I would like to limit a form so that entries are retained for no longer than 90 days.

    That is, all entries over 90 days will be automatically erased.

    Is there a way to do this? I don't see one.

    This is not the same as limiting the number of entries that a form will accept before locking people out.

    Posted 11 years ago on Tuesday January 8, 2013 | Permalink
  2. There is no built in way to do this. It's not a feature of Gravity Forms. You will need to delete them from the database using some SQL and a cron job.

    Here is a snippet of code which shows how to delete every entry for form 1 immediately after submission. Do not use this code. You want to use something like this, but combine it with the SQL to check the time stamp and determine if the entry is more than 90 days old. If it is, delete it. Again, don't use this code as is. I am posting it only so you can see what information needs to be deleted when you delete a lead directly from the database.

    Read this code, but please do not use it as is:
    http://pastie.org/1435911

    Posted 11 years ago on Wednesday January 9, 2013 | Permalink
  3. Anonymous
    Unregistered

    Thank you for the info. May I request that you consider this for a feature in future versions.

    Some companies have rules about how long data may be retained.

    For example, a company may specify that we retain the data for at most 90 days (or even at most 15 days) to minimize the privacy impact if there were a breach of security.

    This would also be useful for keeping the database from growing without limit.

    Thank you!

    Scott

    Posted 11 years ago on Wednesday January 9, 2013 | Permalink
  4. I'll mark this as a feature request. Thank you for the suggestion.

    Posted 11 years ago on Wednesday January 9, 2013 | Permalink
  5. Moved to feature requests.

    Posted 11 years ago on Wednesday January 9, 2013 | Permalink