<?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: Image Field as Post Field is Limiting</title>
		<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting</link>
		<description>Gravity Support Forums Topic: Image Field as Post Field is Limiting</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 05:20:16 +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/image-field-as-post-field-is-limiting" rel="self" type="application/rss+xml" />

		<item>
			<title>adew on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-4767</link>
			<pubDate>Mon, 19 Apr 2010 11:57:26 +0000</pubDate>
			<dc:creator>adew</dc:creator>
			<guid isPermaLink="false">4767@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If you're using more than one form on your site, bear in mind that the gform_post_submission runs every time a form is submitted. To avoid &#34;empty&#34; custom fields being created by forms that don't require it, modify Alex's code (posted above) to this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_post_submission&#38;quot;, &#38;quot;add_post_custom_field&#38;quot;);&#38;lt;br /&#38;gt;
function add_post_custom_field($entry){&#38;lt;br /&#38;gt;
	if( !empty( $entry[2] ) ) {&#38;lt;br /&#38;gt;
		add_post_meta($entry[&#38;quot;post_id&#38;quot;], &#38;quot;my_custom_field_name&#38;quot;, $entry[2]);&#38;lt;br /&#38;gt;
	}&#38;lt;br /&#38;gt;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Obviously, change the $entry id with the actual $entry filed id.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1648</link>
			<pubDate>Fri, 20 Nov 2009 12:50:09 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">1648@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That worked perfectly. :) Thanks again!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1477</link>
			<pubDate>Fri, 13 Nov 2009 23:15:46 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1477@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Dave,&#60;br /&#62;
The following code will add a custom field to the post that was just created with the URL of a file uploaded from a file upload field. Add it to your template's function.php file.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
add_action(&#34;gform_post_submission&#34;, &#34;add_post_custom_field&#34;);&#60;br /&#62;
function add_post_custom_field($entry){&#60;br /&#62;
    add_post_meta($entry[&#34;post_id&#34;], &#34;my_custom_field_name&#34;, $entry[2]);&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Note that you will have to replace &#34;2&#34; (in $entry[2]) with your file upload field id.&#60;br /&#62;
You can get the id by inspecting the HTML of the file upload field. It's name will be in the following format &#34;input_ID&#34; (i.e. input_2).&#60;br /&#62;
Let me know how it goes.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1463</link>
			<pubDate>Fri, 13 Nov 2009 14:26:23 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1463@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You would use the post submission action to edit the post (adding a new custom field) based on the file upload field. At that point, the entry is created and the URL for the file upload is known. I will come up with a code snippet for you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1459</link>
			<pubDate>Fri, 13 Nov 2009 14:13:48 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">1459@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;How would they &#34;know&#34; the URL? I'd love to get this to work so any help you can give would be greatly appreciated. Let me know if you need any details from me.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1458</link>
			<pubDate>Fri, 13 Nov 2009 14:05:25 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">1458@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Dave,&#60;br /&#62;
You could use a hook to create a custom field with the URL of an uploaded file.&#60;br /&#62;
If that works for you, I can send you a code snippet.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1444</link>
			<pubDate>Thu, 12 Nov 2009 10:47:32 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">1444@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Oh, I figured it would have been easy since WP has a &#34;media&#34; upload option on the new post page. I figured images/files would have been handled the same. :$ Is there any way that I can link the file upload to the post then? Maybe pushing the URL through a custom field or something?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1443</link>
			<pubDate>Thu, 12 Nov 2009 10:17:35 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">1443@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I don't think there is anyway to do this right now.  The field is pretty specific as to how it processes the file that is uploaded, and non-images would have to be processed different than images.  We would have to make changes to the plugin and add a file upload (non-images) to the post fields.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Image Field as Post Field is Limiting"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/image-field-as-post-field-is-limiting#post-1416</link>
			<pubDate>Tue, 10 Nov 2009 09:37:46 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">1416@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is there an easy way to get the Image Field that is associated with posts to be just an Upload Field? I want people to upload documents and have them associated with posts.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
