<?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: Create &#34;Static&#34; Field Names?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/create-static-field-names</link>
		<description>Gravity Support Forums Topic: Create &quot;Static&quot; Field Names?</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 12:24:22 +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/create-static-field-names" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Create &#34;Static&#34; Field Names?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/create-static-field-names#post-38651</link>
			<pubDate>Sat, 22 Oct 2011 12:22:30 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38651@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I will bring this post to Carl's attention to consider your suggestion.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Edh on "Create &#34;Static&#34; Field Names?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/create-static-field-names#post-38649</link>
			<pubDate>Sat, 22 Oct 2011 12:12:52 +0000</pubDate>
			<dc:creator>Edh</dc:creator>
			<guid isPermaLink="false">38649@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks, Chris.&#60;/p&#62;
&#60;p&#62;I had thought about using the CSS as a workaround, but then they (might) complicate the UI.&#60;/p&#62;
&#60;p&#62;Would it be possible in a future update to allow an advanced option to set either the field name or ID?  (or does GF really use both for processing)?&#60;/p&#62;
&#60;p&#62;Thanks again,&#60;br /&#62;
-Ed
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Create &#34;Static&#34; Field Names?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/create-static-field-names#post-38642</link>
			<pubDate>Sat, 22 Oct 2011 11:41:41 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">38642@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The field names are dynamically created for each form.  I don't think it would be possible to assign static names.  So, we need another approach.&#60;/p&#62;
&#60;p&#62;If you want to apply some processing to all forms, you can assign a custom CSS class in the form builder.    Then, you can process any field with that specific CSS class.  Here are a couple of snippets you can incorporate into your function.&#60;/p&#62;
&#60;p&#62;This will look through your form for any field with the custom CSS class &#60;strong&#62;my_class&#60;/strong&#62; and apply your processing to that field:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
if(strpos($field[&#38;#39;cssClass&#38;#39;], &#38;#39;my_class&#38;#39;) === true) {
// process this field
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
if($field[&#38;#39;type&#38;#39;] = &#38;#39;select&#38;#39;) { // or whatever TYPE of field you want to process
// process this field
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can combine them as well, like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
if($field[&#38;#39;type&#38;#39;] = &#38;#39;select&#38;#39; &#38;amp;&#38;amp; (strpos($field[&#38;#39;cssClass&#38;#39;], &#38;#39;my_class&#38;#39;) === true)) {
// process this field
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Here's an example of looping through all the fields in a form, to see how it works:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You would be using the same process with gform_after_submission rather than gform_pre_render.&#60;/p&#62;
&#60;p&#62;Also, gform_after_submission is available in 1.6 and later, so be sure you're using the latest release candidate.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Edh on "Create &#34;Static&#34; Field Names?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/create-static-field-names#post-38629</link>
			<pubDate>Fri, 21 Oct 2011 21:51:32 +0000</pubDate>
			<dc:creator>Edh</dc:creator>
			<guid isPermaLink="false">38629@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is this possible?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
-Ed
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Edh on "Create &#34;Static&#34; Field Names?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/create-static-field-names#post-38249</link>
			<pubDate>Tue, 18 Oct 2011 20:50:59 +0000</pubDate>
			<dc:creator>Edh</dc:creator>
			<guid isPermaLink="false">38249@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am writing a plugin to post-process form data using a gform_after_submission hook.&#60;/p&#62;
&#60;p&#62;I am after several specific fields that will appear across multiple forms (but not always in the same placement)&#60;/p&#62;
&#60;p&#62;Is there any way (during form creation) to create a field name/ID to be a static value that the plugin can always find, so that it does not need to be updated every-time a new form is added (or changed)&#60;/p&#62;
&#60;p&#62;As an Example, the phone number of this form is  the first field, but on other forms it it the 3rd field &#38;amp; 11th field.  I'd like to use the same line of code to get all of them regardless of the field position.&#60;br /&#62;
$phoneNum = ($_POST['input_1']);&#60;/p&#62;
&#60;p&#62;hope this makes sense.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;br /&#62;
-Ed
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
