<?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: New Filters &#38; Action Hooks Requests</title>
		<link>https://legacy.forums.gravityhelp.com/topic/new-filters-action-hooks-requests</link>
		<description>Gravity Support Forums Topic: New Filters &amp; Action Hooks Requests</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 23:39:01 +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/new-filters-action-hooks-requests" rel="self" type="application/rss+xml" />

		<item>
			<title>randomwalk on "New Filters &#38; Action Hooks Requests"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/new-filters-action-hooks-requests#post-20179</link>
			<pubDate>Tue, 08 Mar 2011 19:14:21 +0000</pubDate>
			<dc:creator>randomwalk</dc:creator>
			<guid isPermaLink="false">20179@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hiya,&#60;/p&#62;
&#60;p&#62;I'm writing a plugin to GravityForms that adds some custom field types, and other miscellaneous bits.  It's going well, but there's a couple places in GravityForms that would be lovely to have the apply_filters() and do_action() calls actually in there natively, so I don't have to 'hack core' (so to speak).&#60;/p&#62;
&#60;p&#62;They are:&#60;/p&#62;
&#60;p&#62;/js.php&#60;/p&#62;
&#60;p&#62;In the midst of the massive switch() statement, within the SetDefaultValues() function, if you could add (somewhere in there) the following:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php do_action(&#38;quot;gform_editor_js_set_default_values&#38;quot;); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;that would enable people to add 'catchers' for the custom field types.&#60;/p&#62;
&#60;p&#62;---&#60;/p&#62;
&#60;p&#62;/form_display.php&#60;/p&#62;
&#60;p&#62;Toward the end of the function get_form(), if you could change the return statement &#60;code&#62;return $form_string;&#60;/code&#62; to:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;return apply_filters(&#38;quot;gform_get_form_filter&#38;quot;,$form_string);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;that would enable modules to use preg_replace and custom placeholder strings to let forms generate dynamic options for dropdowns and the like, along with any number of other customizations that I've not even dreamed of.&#60;/p&#62;
&#60;p&#62;---&#60;/p&#62;
&#60;p&#62;/form_detail.php&#60;/p&#62;
&#60;p&#62;At the very end of the file, in the save_form() function, if you could add two actions, both just before the die() statements ... before &#60;code&#62;die(&#38;quot;EndUpdateForm($id);&#38;quot;);&#60;/code&#62;, add&#60;/p&#62;
&#60;p&#62;&#60;code&#62;do_action( &#38;quot;gform_edit_existing_form&#38;quot;, $id, $form_meta );&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and before &#60;code&#62;die(&#38;quot;EndInsertForm($id);&#38;quot;);&#60;/code&#62;, add&#60;/p&#62;
&#60;p&#62;&#60;code&#62;do_action( &#38;quot;gform_add_new_form&#38;quot;, $id, $form_meta );&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;These changes would let developers trigger events on people either saving a new form, or updating an existing form.  For example (as in my use case), creating a new post (custom post type) automatically, whenever a form is made, to streamline workflow.&#60;/p&#62;
&#60;p&#62;---&#60;/p&#62;
&#60;p&#62;Thanks!  I may have some other places to request hooks later on, but that's it for now (I think).  It strikes me as these filters and hooks would be the work of a moment to include on your end, and increase significantly the extensibility of your plugin.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
