<?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: How To: Custom Field Values Without Having to Use IDs</title>
		<link>https://legacy.forums.gravityhelp.com/topic/how-to-custom-field-values-without-having-to-use-ids</link>
		<description>Gravity Support Forums Topic: How To: Custom Field Values Without Having to Use IDs</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 12:23:34 +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/how-to-custom-field-values-without-having-to-use-ids" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "How To: Custom Field Values Without Having to Use IDs"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-custom-field-values-without-having-to-use-ids#post-3415</link>
			<pubDate>Mon, 15 Feb 2010 23:59:39 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">3415@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Very nice.   It's great to see people thinking outside the box and leverage some of the capabilities the plugin has from a customization standpoint using hooks with php and jquery.&#60;/p&#62;
&#60;p&#62;We do have plans to add value/label capabilities as well as field calculations in the future.&#60;/p&#62;
&#60;p&#62;Just remember that Gravity Forms is still in it's infancy, we still have a long journey ahead of us as we continue to add new features and improve existing features.&#60;/p&#62;
&#60;p&#62;Thanks for sharing! If you would be willing to write this up as a guest blog post, give some background to what you are doing and write up a detailed blog post/tutorial, we would be glad to post it on the blog and make it available to users who want to read up on how to do this.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wunderdojo on "How To: Custom Field Values Without Having to Use IDs"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-to-custom-field-values-without-having-to-use-ids#post-3414</link>
			<pubDate>Mon, 15 Feb 2010 22:00:04 +0000</pubDate>
			<dc:creator>wunderdojo</dc:creator>
			<guid isPermaLink="false">3414@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Something like this may be posted elsewhere, but as I haven't found it, figured I'd post in case it helps someone else. &#60;/p&#62;
&#60;p&#62;I needed to use custom values for some drop down menus on a form I'm doing for a client. This is my first time using Gravity Forms and I found here in the forums that you have to do a bit of coding to accomplish this -- the built in functionality is to make the value and the label of a field be the same. So if you need option 1 value='1&#34; and the displayed value = First Option, you've go to do some work.&#60;/p&#62;
&#60;p&#62;The solution posted here in the forums requires you to get the field ID of the field you want to use custom values for by looking at the source code of the form. No big deal if you're only modifying one or two fields, but I have the drop down repeated potentially up to 10 times on the form.&#60;/p&#62;
&#60;p&#62;The work around I came up with is to add a custom css class to the form field. In this case, I have a dropdown menu that I gave a css class of &#34;customvalues&#34;. I then use that css class to access the fields and use the custom values:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
add_filter('gform_pre_render_1', 'fieldvals');&#60;br /&#62;
function fieldvals($form){&#60;br /&#62;
items = array();&#60;br /&#62;
$items[] = array('text' =&#38;gt; &#34;-Displayed Value 1&#34;, &#34;value&#34; =&#38;gt; '10');&#60;br /&#62;
$items[] = array('text' =&#38;gt; &#34;Displayed Value 2&#34;, &#34;value&#34; =&#38;gt; '20');&#60;br /&#62;
$items[] = array('text' =&#38;gt; &#34;Displayed Value 3&#34;, &#34;value&#34; =&#38;gt; '30');&#60;br /&#62;
foreach($form[&#34;fields&#34;] as &#38;amp;$field)&#60;br /&#62;
 if($field[&#34;cssClass&#34;] == &#34;customvalues&#34;){&#60;br /&#62;
 $field[&#34;type&#34;] = &#34;select&#34;;&#60;br /&#62;
           $field[&#34;choices&#34;] = $items;&#60;br /&#62;
        }&#60;br /&#62;
    return $form;&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;If you want to do any  dynamic updating on the form, you can then access those dropdowns using jquery and the same css class, like so :&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
jQuery(document).ready(function($jq) {&#60;br /&#62;
$jq(&#34;.customvalues select&#34;).change(function(){&#60;br /&#62;
$jq(&#34;.customvalues option:selected&#34;).each(function(i){&#60;br /&#62;
alert($jq(this).val());&#60;br /&#62;
});&#60;br /&#62;
});&#60;br /&#62;
});&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I'm using it to dynamically calculate totals based on membership options selected on a member sign up form and display the running total. The example above just alerts the value of the selected options.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
