<?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: Hide/Display submitted entry based on whether a file was uploaded or not</title>
		<link>https://legacy.forums.gravityhelp.com/topic/hidedisplay-submitted-entry-based-on-whether-a-file-was-uploaded-or-not</link>
		<description>Gravity Support Forums Topic: Hide/Display submitted entry based on whether a file was uploaded or not</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:24: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/hidedisplay-submitted-entry-based-on-whether-a-file-was-uploaded-or-not" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Hide/Display submitted entry based on whether a file was uploaded or not"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidedisplay-submitted-entry-based-on-whether-a-file-was-uploaded-or-not#post-203575</link>
			<pubDate>Wed, 10 Apr 2013 05:22:29 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">203575@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for posting your experience.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>weevie833 on "Hide/Display submitted entry based on whether a file was uploaded or not"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hidedisplay-submitted-entry-based-on-whether-a-file-was-uploaded-or-not#post-197844</link>
			<pubDate>Fri, 05 Apr 2013 14:15:55 +0000</pubDate>
			<dc:creator>weevie833</dc:creator>
			<guid isPermaLink="false">197844@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is not a problem - I found a solution. I thought I should share it with the community.&#60;/p&#62;
&#60;p&#62;Goal: provide a webform with a file upload field, and then convert the submitted entry to a Post. In the post, show the uploaded file in a custom download box with a download icon, or if there was no file upload submitted, do not show the download box.&#60;/p&#62;
&#60;p&#62;Solution: Setup 5 fields in the form:&#60;br /&#62;
(1) a Yes/No radio button field for &#34;Upload a File?&#34; set to &#34;No&#34; default;&#60;br /&#62;
(2) a Custom field set to Upload File, with a condition to display if #1 is Yes;&#60;br /&#62;
(3) a Custom Field set to Admin view only with a default value set to &#34;upload&#34; (without the quot marks and no period before it - this is a custom CSS I created in the master style sheet that forms the Download box and icon). This field is set to a condition to display if #1 is &#34;Yes&#34;, but since it is an Admin Only field, it doesn't actually display in the form to the user;&#60;br /&#62;
(4) Another Custom Field, same as #3, except with a default value of &#34;hide&#34; (a CSS class set to display:none) and a condition to display with #1 as a &#34;No&#34;.&#60;br /&#62;
(5) a Post Body field, set to Admin Only, with Merge tags from other fields, including the following&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;div class=&#38;quot;{Admin Only - Hide upload if none selected:26}{Admin Only - Display if file uploaded:27}&#38;quot;&#38;gt;&#38;lt;a href=&#38;quot;{File upload:20}&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;http://mysite.com/wp-content/uploads/textdoc_tn.png&#38;quot; /&#38;gt;&#38;lt;span&#38;gt;Download Supporting Documentation&#38;lt;/span&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/div&#38;gt;&#38;lt;br /&#38;gt;&#38;lt;p&#38;gt;[embed]{Post your YouTube link here:23}[/embed]&#38;lt;/p&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;The trick: The merge tags above for Custom Fields #3 and #4 are set to insert either the &#34;upload&#34; or &#34;hide&#34; class into the display div class depending on which Yes/No selection is made. Note that the default value in #3 and #4 is just the class name WITHOUT the period in front of it.&#60;/p&#62;
&#60;p&#62;BTW, the [embed] section is a single line text field for users to copy/paste a YouTube URL into it, which publishes it in the post. Even though WP has the embed parsing capabilities built-in, it doesn't work without these shortcode tags added around the merge tag.&#60;/p&#62;
&#60;p&#62;If there is a more poetic way of doing this, please add a comment. I tried a LOT of other solution before this worked!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
