<?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 do I get field labels in a pre_submission_filter?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-get-field-labels-in-a-pre_submission_filter</link>
		<description>Gravity Support Forums Topic: How do I get field labels in a pre_submission_filter?</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 01:26:49 +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-do-i-get-field-labels-in-a-pre_submission_filter" rel="self" type="application/rss+xml" />

		<item>
			<title>sydeburn on "How do I get field labels in a pre_submission_filter?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/how-do-i-get-field-labels-in-a-pre_submission_filter#post-152436</link>
			<pubDate>Fri, 22 Feb 2013 14:40:31 +0000</pubDate>
			<dc:creator>sydeburn</dc:creator>
			<guid isPermaLink="false">152436@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi, I created a gform_pre_submission_filter in which I need to access to the field labels. For example I have the following line:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if ($_POST[&#38;#39;input_13&#38;#39;] == &#38;#39;Yes&#38;#39;) {
	$q1docs = $q1docs.&#38;#39;--&#38;#39;.$form[&#38;#39;fields&#38;#39;][7][&#38;#39;label&#38;#39;];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This works as expected. But my form is several pages and it is difficult to determine the proper index (i.e. the 7 in $form['fields'][7]['label']) for fields further along in the form. &#60;/p&#62;
&#60;p&#62;I do know the Field ID, but unfortunately the index does not correlate to the field ID.  For example the Field ID of $form['fields'][7] is 4, not 7.&#60;/p&#62;
&#60;p&#62;Is there a way to get the label programatically without knowing the index of that field?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
