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.

Prevent Entry from Saving

  1. Is there a way to prevent Gravity Forms from saving data in the database once the form has been emailed? I was thinking of using this for clients to email their credit card info to me from a secure site and processing the cards in house. I just need the form emailed, not stored.

    Thanks!

    Posted 14 years ago on Thursday August 12, 2010 | Permalink
  2. Alex could probably answer this better than me, but the first solution that comes to mind would be simply deleting the entry immediately after the emails have been sent.

    If you're familiar with PHP you can use the gform_post_submission hook to get the ID of the entry that was just created and then you can create a custom version of the GF function delete_lead (found in forms_model.php ~ line 512). The reason you couldn't simply use the GF version of the delete_function is because it does a permissions check and most users who submit the form would not have sufficient permissions to delete a lead.

    Hope that helps.

    Posted 14 years ago on Thursday August 12, 2010 | Permalink
  3. The only way this is possible is to use PHP to immediately delete the entry once it is created. If you search the forums I believe there is already a code snippet for this in another thread, i'd have to do some searching for it.

    Posted 14 years ago on Thursday August 12, 2010 | Permalink
  4. Carl, do you know where this code is? I was unable to find it. Thanks!

    Posted 14 years ago on Thursday August 19, 2010 | Permalink