# Stop form submission and return error message

**URL:** <https://community.gravityforms.com/t/stop-form-submission-and-return-error-message/2427>\
**Category:** Get Help\
**Created:** [August 8, 2019, 9:08pm UTC](https://community.gravityforms.com/t/stop-form-submission-and-return-error-message/2427 "2019-08-08T21:08:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ineade](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/ineade/32/930_2.png) [@Ineade](https://community.gravityforms.com/u/Ineade)\
**Post date:** [August 8, 2019, 9:08pm UTC](https://community.gravityforms.com/t/stop-form-submission-and-return-error-message/2427/1 "2019-08-08T21:08:58Z")

</div>

Hello,

How can I stop sending the form and registering the entry based on the gform\_after\_submission function?

I comment, at the time of sending Send I have to send the information by API to another server and depending on the result you should or not send the email and register the entry.

Thank you.

---

<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:** [August 8, 2019, 9:11pm UTC](https://community.gravityforms.com/t/stop-form-submission-and-return-error-message/2427/2 "2019-08-08T21:11:34Z")

</div>

It sounds similar to the discussion here:

> [@Stop form submission and make user enter a field if response is zero \[RESOLVED\]](https://community.gravityforms.com/t/stop-form-submission-and-make-user-enter-a-field-if-response-is-zero/2393):
>
> Hi Team, I am sending the form data to external url. I am trying to do something like this : If Reponse == 0 don’t submit form Make user renter the value of a form field saying something like “Please enter a valid address” else Submit form I am not sure what filters and functions to use to make it work. Regards, Pallavi

---

<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:21pm UTC](https://community.gravityforms.com/t/stop-form-submission-and-return-error-message/2427/3 "2022-01-04T17:21:48Z")

</div>


