# How to STOP a submission

**URL:** <https://community.gravityforms.com/t/how-to-stop-a-submission/6776>\
**Category:** Get Help\
**Tags:** gform\_pre\_submission, gform\_after\_submission\
**Created:** [November 7, 2020, 6:30pm UTC](https://community.gravityforms.com/t/how-to-stop-a-submission/6776 "2020-11-07T18:30:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5fa6e7006bc80328](https://avatars.discourse-cdn.com/v4/letter/u/919ad9/32.png) [@user5fa6e7006bc80328](https://community.gravityforms.com/u/user5fa6e7006bc80328)\
**Post date:** [November 7, 2020, 6:30pm UTC](https://community.gravityforms.com/t/how-to-stop-a-submission/6776/1 "2020-11-07T18:30:34Z")

</div>

I have a WP site that is calling gform\_after\_submission in function.php so I can do some stuff first.

eg. `add_action( 'gform_after_submission', 'funcSendLeadFormToEP', 10, 2 );`

This works fine. I want to now selectively stop form submissions from being saved to the database in Entries table. How do I do this? If I simply “return” right away it still submits.

eg.  
function funcSendLeadFormToEP( $entry, $form )  
{ return }

does not work. any idea?

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [November 8, 2020, 1:38pm UTC](https://community.gravityforms.com/t/how-to-stop-a-submission/6776/2 "2020-11-08T13:38:28Z")

</div>

Hi Ken. If you’re using gform\_after\_submission, the entry has already been created. If you want to do something before the entry is created, you can use gform\_pre\_submission, and then decide if you want to create the entry or not based on your “doing stuff”.

> **[gform\_pre\_submission - Gravity Forms Documentation](https://docs.gravityforms.com/gform_pre_submission/)**
>
> This action can be used to modify the posted values after form validation but prior to creating the entry.

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 4, 2022, 5:50pm UTC](https://community.gravityforms.com/t/how-to-stop-a-submission/6776/3 "2022-01-04T17:50:36Z")

</div>


