<?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 form for users that are not logged in</title>
		<link>https://legacy.forums.gravityhelp.com/topic/hide-form-for-users-that-are-not-logged-in</link>
		<description>Gravity Support Forums Topic: Hide form for users that are not logged in</description>
		<language>en-US</language>
		<pubDate>Wed, 08 Apr 2026 12:39:29 +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/hide-form-for-users-that-are-not-logged-in" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Hide form for users that are not logged in"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-form-for-users-that-are-not-logged-in#post-42684</link>
			<pubDate>Thu, 01 Dec 2011 01:26:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">42684@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It's new in the 1.6 version of the plugin which was recently released.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jloosli on "Hide form for users that are not logged in"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-form-for-users-that-are-not-logged-in#post-42644</link>
			<pubDate>Wed, 30 Nov 2011 19:58:25 +0000</pubDate>
			<dc:creator>jloosli</dc:creator>
			<guid isPermaLink="false">42644@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is that a (relatively) new option? It seems like I was looking for that a while ago! For now, I've just got the submit button hidden via CSS. For this situation, I've got a plugin I wrote that connects particular forms up to particular capabilities, so the plugin grabs that information to determine which forms get need to be hidden and which ones don't, so I'm going to try to play around with that route and see if I can integrate it better. For now though, it works.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Hide form for users that are not logged in"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-form-for-users-that-are-not-logged-in#post-42621</link>
			<pubDate>Wed, 30 Nov 2011 18:56:45 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">42621@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If you don't want a form to be visible if a user is not logged in there is a Form Settings specifically for this that lets you disable the form unless the user is logged in.&#60;/p&#62;
&#60;p&#62;See this screenshot, specifically the last option:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-11-30%20at%205.55.18%20PM.png&#34; rel=&#34;nofollow&#34;&#62;http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202011-11-30%20at%205.55.18%20PM.png&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;That option also let's you display a message instead of the form if the user that is browsing the page is not logged in.  The message also supports shortcodes.  So you could control which form they see by inserting a shortcode for a different Gravity Form in the message for the &#34;Require user to be logged in&#34; setting.  &#60;/p&#62;
&#60;p&#62;This would allow you to display Form A if the user is logged in and Form B if the user is not logged in.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jloosli on "Hide form for users that are not logged in"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hide-form-for-users-that-are-not-logged-in#post-42592</link>
			<pubDate>Wed, 30 Nov 2011 17:00:57 +0000</pubDate>
			<dc:creator>jloosli</dc:creator>
			<guid isPermaLink="false">42592@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There are certain forms that  I don't want people to fill out if they're not logged in, so I've put this in as the function for the gform_pre_render_{id} filter:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function need_login_filter($form)
        {
            if(!is_user_logged_in()) {
                $newForm=array(
                    &#38;#39;title&#38;#39; =&#38;gt; &#38;#39;You need to log in&#38;#39;,
                    &#38;#39;description&#38;#39;    =&#38;gt; &#38;#39;You have to log in to access this item&#38;#39;
                    )
                );
                $form=$newForm;
            }
            return $form;
        }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Which works great for putting up my message, but the submit button is still there. I added 'button' rules to the form object, but when I do, the whole form disappears (including my changed text):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$newForm=array(
                    &#38;#39;title&#38;#39; =&#38;gt; &#38;#39;You need to log in&#38;#39;,
                    &#38;#39;description&#38;#39;    =&#38;gt; &#38;#39;You have to log in to access this item&#38;#39;,
                    &#38;#39;button&#38;#39;    =&#38;gt; array(
                        &#38;#39;conditionalLogic&#38;#39; =&#38;gt; array(
                            &#38;#39;actionType&#38;#39; =&#38;gt; &#38;#39;show&#38;#39;,
                            &#38;#39;logicType&#38;#39; =&#38;gt; &#38;#39;all&#38;#39;,
                            &#38;#39;rules&#38;#39; =&#38;gt; array(
                                &#38;#39;fieldId&#38;#39; =&#38;gt; 0,
                                &#38;#39;operator&#38;#39; =&#38;gt; &#38;#39;isnot&#38;#39;,
                                &#38;#39;value&#38;#39;     =&#38;gt; &#38;#39;jibberish&#38;#39;
                            )
                        )
                    )
                );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So what's the best way to go about doing this? I could wrap it in a shortcode to hide the form based on membership, but I've got a few other things set up that require me to take care of this internal to GravityForms.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
