<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Examples for a pre submission hook?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook</link>
		<description>Gravity Support Forums Topic: Examples for a pre submission hook?</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 04:53:05 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/examples-for-a-pre-submission-hook" rel="self" type="application/rss+xml" />

		<item>
			<title>David Smith on "Examples for a pre submission hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook#post-43849</link>
			<pubDate>Mon, 12 Dec 2011 19:23:24 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">43849@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Glad to hear, bartpe. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bartpe on "Examples for a pre submission hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook#post-43701</link>
			<pubDate>Sun, 11 Dec 2011 15:45:20 +0000</pubDate>
			<dc:creator>bartpe</dc:creator>
			<guid isPermaLink="false">43701@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I finally managed to customize my form via the validation hook. Works like a charm.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cdatwood on "Examples for a pre submission hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook#post-43513</link>
			<pubDate>Thu, 08 Dec 2011 22:37:56 +0000</pubDate>
			<dc:creator>cdatwood</dc:creator>
			<guid isPermaLink="false">43513@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm interested in doing a similar method -- I want to cancel submission and throw an error with a link to a different page. &#60;/p&#62;
&#60;p&#62;I'd love a tip for what kind of function to call to send a message like that back to the screen in place of a success message, and to abort the rest of the submit so the data isn't inserted into wp_rg_lead and wp_rg_lead_details.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bartpe on "Examples for a pre submission hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook#post-43306</link>
			<pubDate>Wed, 07 Dec 2011 04:30:07 +0000</pubDate>
			<dc:creator>bartpe</dc:creator>
			<guid isPermaLink="false">43306@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Carl,&#60;br /&#62;
Thanks for the answer. Actually I'd like to do somthing like this: &#60;a href=&#34;http://www.gravityhelp.com/forums/topic/guestlist-quantity-setup&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/guestlist-quantity-setup&#60;/a&#62;&#60;br /&#62;
So the user should get a message that te form can't be submitted because a certain quoata has been reached (so an on screen notification would be ok?).&#60;br /&#62;
Can you provide me some code hints for this?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Examples for a pre submission hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook#post-43251</link>
			<pubDate>Tue, 06 Dec 2011 17:39:08 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">43251@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There is a basic example of the gform_pre_submission hook on it's documentation page here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_pre_submission&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_pre_submission&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You are correct that you'll need to query the wp_rg_lead_details table.  &#60;/p&#62;
&#60;p&#62;As for how you can cancel the submission, what would be an example of a scenario where you would want to do so that way I better understand what you are trying to implement? Do you want to show a validation error or do you want to show a message and hide the form?&#60;/p&#62;
&#60;p&#62;To notify the user that the submission is canceled, and the response returned to the user on the screen isn't sufficient, you can write PHP to send an email to that user if one of the fiels is an email field or if they are logged in user you can use their user account email address.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bartpe on "Examples for a pre submission hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook#post-43228</link>
			<pubDate>Tue, 06 Dec 2011 14:34:51 +0000</pubDate>
			<dc:creator>bartpe</dc:creator>
			<guid isPermaLink="false">43228@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok, so I already figured out I'll need to query the wp_rg_lead_details table. I think I'll manage writing this query, but I still need to know:&#60;br /&#62;
- how can I cancel submission&#60;br /&#62;
- how can I notify the user that submission is canceled.&#60;/p&#62;
&#60;p&#62;Kind regards,&#60;br /&#62;
Bart.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bartpe on "Examples for a pre submission hook?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/examples-for-a-pre-submission-hook#post-43211</link>
			<pubDate>Tue, 06 Dec 2011 06:01:12 +0000</pubDate>
			<dc:creator>bartpe</dc:creator>
			<guid isPermaLink="false">43211@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Could someone submit an example for the implementation of a pre submission hook?&#60;br /&#62;
I'd like to query (sum) all values of a certain form field and reject form submission if this value is grater than a certain amount.&#60;br /&#62;
I think I can manage to code this if I can see some examples on how to use these queries from the hook and how to reject the submission.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
