<?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: Custom Field Name</title>
		<link>https://legacy.forums.gravityhelp.com/topic/custom-field-name</link>
		<description>Gravity Support Forums Topic: Custom Field Name</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 07:07: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/custom-field-name" rel="self" type="application/rss+xml" />

		<item>
			<title>urmedia on "Custom Field Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-name#post-13444</link>
			<pubDate>Fri, 26 Nov 2010 19:43:59 +0000</pubDate>
			<dc:creator>urmedia</dc:creator>
			<guid isPermaLink="false">13444@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;cool, glad you found a fix.  Be sure to check it works in all major browsers...I know some have issues with iframes - especially mobile devices
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Sig Kappel on "Custom Field Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-name#post-13442</link>
			<pubDate>Fri, 26 Nov 2010 19:40:32 +0000</pubDate>
			<dc:creator>Sig Kappel</dc:creator>
			<guid isPermaLink="false">13442@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You know what.. here's what I did to produce a solution to my problem.. &#60;/p&#62;
&#60;p&#62;I wanted to set session values based on a common identifier (label or id) that's why I was asking for the custom ID.. &#60;/p&#62;
&#60;p&#62;But after taking a second look at the hook function provided in the documentation I found a way to do what I want relatively painlessly..&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;foreach($form_meta[&#38;quot;fields&#38;quot;] as $field)
{
	 //handling single-input fields
	$value = $_POST[&#38;quot;input_&#38;quot; . $field[&#38;quot;id&#38;quot;]];

	//based on the label set the session field.
	if($field[&#38;quot;label&#38;quot;] == &#38;quot;First Name&#38;quot;){ $_SESSION[&#38;quot;userFirstName&#38;quot;] = $value;}
	if($field[&#38;quot;label&#38;quot;] == &#38;quot;Last Name&#38;quot;){$_SESSION[&#38;quot;userLastName&#38;quot;] = $value;}
	if($field[&#38;quot;label&#38;quot;] == &#38;quot;Email&#38;quot;){$_SESSION[&#38;quot;userEmail&#38;quot;] = $value;}
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Sig Kappel on "Custom Field Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-name#post-13414</link>
			<pubDate>Fri, 26 Nov 2010 16:20:59 +0000</pubDate>
			<dc:creator>Sig Kappel</dc:creator>
			<guid isPermaLink="false">13414@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the suggestion.. it's a migty workaround (modifying the dom with javascript) I would probably want to do it with custom classes and then get the javascript to rename according to custom class name.. &#60;/p&#62;
&#60;p&#62;yeah.. It's a bit much.. &#60;/p&#62;
&#60;p&#62;I really think they should apply a custom id option.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>urmedia on "Custom Field Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-name#post-13375</link>
			<pubDate>Fri, 26 Nov 2010 07:44:44 +0000</pubDate>
			<dc:creator>urmedia</dc:creator>
			<guid isPermaLink="false">13375@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok...this might not be *exactly* what you are looking for but you can dynamically change field names with javascript.&#60;/p&#62;
&#60;p&#62;ie:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;inputs = document.getElementsByTagName(&#38;quot;input&#38;quot;);
for(i=0; i &#38;lt; inputs.length; i++){
inputs[i].name=&#38;quot;my_name&#38;quot;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;quick edit:&#60;/p&#62;
&#60;p&#62;You would need to call this type of javascript before the submit or posting of the form.  Ideally you would use it with jquery or even a simple &#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;code&#38;gt;&#38;lt;body onLoad=&#38;amp;quot;javascript_function&#38;amp;quot; &#38;gt;&#38;lt;/code&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Otherwise the post data of the form will send with the originally named fields.&#60;/p&#62;
&#60;p&#62;bah.  Edit # 2:&#60;/p&#62;
&#60;p&#62;If you are terribly bored you can always write up a javascript class that changes the element name to the class name.  You CAN change the css class name with GF so..it would then matter very little how you arranged your fields.&#60;/p&#62;
&#60;p&#62;Last edit, I promise.&#60;/p&#62;
&#60;p&#62;A long way to do it is to send the data using javascript.  You would still need a similar function as listed above, but just pointing out that it is an option.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Sig Kappel on "Custom Field Name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/custom-field-name#post-13368</link>
			<pubDate>Fri, 26 Nov 2010 05:24:01 +0000</pubDate>
			<dc:creator>Sig Kappel</dc:creator>
			<guid isPermaLink="false">13368@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I would like Custom Field Names to be an option.&#60;br /&#62;
so instead of...&#60;br /&#62;
name=&#34;input_1&#34;&#60;br /&#62;
I could have&#60;br /&#62;
name=&#34;firstName&#34;&#60;/p&#62;
&#60;p&#62;That would allow me to write custom pre post hook logic that targets $_POST['firstName']&#60;br /&#62;
for all my forms regardless of the position of the FirstName field. &#60;/p&#62;
&#60;p&#62;It's a pain to figgure out what field name to target and if you move things around your field name changes... &#60;/p&#62;
&#60;p&#62;So please give me the option to change the field name.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
