<?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: Disabling Form Elements</title>
		<link>https://legacy.forums.gravityhelp.com/topic/disabling-form-elements</link>
		<description>Gravity Support Forums Topic: Disabling Form Elements</description>
		<language>en-US</language>
		<pubDate>Fri, 17 Apr 2026 05:33:22 +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/disabling-form-elements" rel="self" type="application/rss+xml" />

		<item>
			<title>UWEX on "Disabling Form Elements"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/disabling-form-elements#post-12406</link>
			<pubDate>Wed, 10 Nov 2010 11:02:02 +0000</pubDate>
			<dc:creator>UWEX</dc:creator>
			<guid isPermaLink="false">12406@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This works perfectly - thanks much!!  I'll go tweet about awesome support :P
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Disabling Form Elements"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/disabling-form-elements#post-12304</link>
			<pubDate>Mon, 08 Nov 2010 17:47:14 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">12304@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can use the &#34;gform_add_field_buttons&#34; to remove the file upload button and the Post Fields group. I think this is all you need to meet your needs.&#60;br /&#62;
Try the following code snippet.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_add_field_buttons&#38;quot;, &#38;quot;remove_fields&#38;quot;);
function remove_fields($field_groups){

    $index = 0;
    $post_field_index = -1;
    $advanced_field_index = -1;

    //Finding group indexes
    foreach($field_groups as $group){
        if($group[&#38;quot;name&#38;quot;] == &#38;quot;post_fields&#38;quot;)
            $post_field_index = $index;
        else if($group[&#38;quot;name&#38;quot;] == &#38;quot;advanced_fields&#38;quot;)
            $advanced_field_index = $index;

        $index ++;
    }

    //removing file upload field
    if($advanced_field_index &#38;gt;=0){
        $file_upload_index = -1;
        $index = 0;
        foreach($field_groups[$advanced_field_index][&#38;quot;fields&#38;quot;] as $advanced_field){

            if($advanced_field[&#38;quot;value&#38;quot;] == &#38;quot;File Upload&#38;quot;)
                $file_upload_index = $index;
            $index++;
        }

        unset($field_groups[$advanced_field_index][&#38;quot;fields&#38;quot;][$file_upload_index]);
    }

    //removing post field group
    if($post_field_index &#38;gt;= 0)
        unset($field_groups[$post_field_index]);

    return $field_groups;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>UWEX on "Disabling Form Elements"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/disabling-form-elements#post-12295</link>
			<pubDate>Mon, 08 Nov 2010 15:07:07 +0000</pubDate>
			<dc:creator>UWEX</dc:creator>
			<guid isPermaLink="false">12295@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Heya - just wondering if there was any progress here.&#60;/p&#62;
&#60;p&#62;We'd really like to resist hacking up GravityForms of course, and it seems with a few lines of code inserted into GravityForms would add this functionality for all your users.&#60;/p&#62;
&#60;p&#62;With MultiSite being included in 3.0 now, these features seem really helpful for people running networks.  We can't be the only ones who want to deny file uploads or post creation forms, are we??&#60;/p&#62;
&#60;p&#62;I might even be fine with &#34;short-term&#34; more simplistic approach of giving IDs to the form elements so that it's much easier to hide them ourselves.&#60;/p&#62;
&#60;p&#62;Thanks again!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Kevin Flahaut on "Disabling Form Elements"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/disabling-form-elements#post-7404</link>
			<pubDate>Wed, 14 Jul 2010 15:47:01 +0000</pubDate>
			<dc:creator>Kevin Flahaut</dc:creator>
			<guid isPermaLink="false">7404@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;There's no easy way to do this right now. We may add some hooks in later that will make it easier, but for now, the jQuery path seems like the way to go.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>UWEX on "Disabling Form Elements"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/disabling-form-elements#post-7402</link>
			<pubDate>Wed, 14 Jul 2010 14:07:49 +0000</pubDate>
			<dc:creator>UWEX</dc:creator>
			<guid isPermaLink="false">7402@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In our WP environment, we don't want to allow users to create forms that either:&#60;br /&#62;
a) Create Posts, or&#60;br /&#62;
b) Upload files from the general public&#60;/p&#62;
&#60;p&#62;I'd love to be able to allow us Site Administrators to remove these - even if it's with our own plugin rather than an administrative screen -  without having to modify your code of course.  I couldn't really find a way to do this, however, other than using jQuery to traverse the DOM and hide the elements.&#60;/p&#62;
&#60;p&#62;Any suggestions or thoughts?  Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
