<?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: Display form &#38; create post draft only if user have a custom capability</title>
		<link>https://legacy.forums.gravityhelp.com/topic/display-form-create-post-draft-only-if-user-have-a-custom-capability</link>
		<description>Gravity Support Forums Topic: Display form &amp; create post draft only if user have a custom capability</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 04:08:50 +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/display-form-create-post-draft-only-if-user-have-a-custom-capability" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Display form &#38; create post draft only if user have a custom capability"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-form-create-post-draft-only-if-user-have-a-custom-capability#post-174497</link>
			<pubDate>Sun, 17 Mar 2013 18:14:23 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">174497@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I don't know if it's possible to submit the form or not, without being logged in.  I've never tried it.  If that's a concern, then you should keep your 2nd security check.  I'm not sure exactly how to implement that after the post is created though.  You could use the gform_pre_submission_filter to check the capabilities of the logged in user, and then decide to do something with the form submission if they user does not have the custom capability.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dashaluna on "Display form &#38; create post draft only if user have a custom capability"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-form-create-post-draft-only-if-user-have-a-custom-capability#post-172127</link>
			<pubDate>Fri, 15 Mar 2013 06:17:13 +0000</pubDate>
			<dc:creator>dashaluna</dc:creator>
			<guid isPermaLink="false">172127@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello Chris,&#60;/p&#62;
&#60;p&#62;Thank you for your reply. That makes sense to display the form only for the users that have the capability.&#60;/p&#62;
&#60;p&#62;As for #2 question, I wasn't sure if it's possible somehow forge a form submission even if they can't see it. Could you please confirm. If it can't be done, then I don't need this extra security check.&#60;/p&#62;
&#60;p&#62;Many thanks, Dasha
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Display form &#38; create post draft only if user have a custom capability"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-form-create-post-draft-only-if-user-have-a-custom-capability#post-168215</link>
			<pubDate>Mon, 11 Mar 2013 21:48:38 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">168215@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;To display the form only for users with a certain capability, I would embed the function call in your page template, then use PHP and WordPress functions to show the form only if the capability 'create_story' is present.  It would look something like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
if ( current_user_can(&#38;#39;create_story&#38;#39;) ) {
    // modify this function call for your needs
    // http:// bit.ly/W3u51L
    gravity_form(1, false, false, false, &#38;#39;&#38;#39;, false);
}
else {
    echo &#38;quot;Sorry, you don&#38;#39;t have permission to post.&#38;quot;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If the form is only visible to people with that capability, I don't understand why #2 is necessary.  It would not be possible to get to this point unless they did have the correct capability.  Please explain more if I misunderstood something.&#60;/p&#62;
&#60;p&#62;You can have the default for the form to be to create a 'draft' post.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dashaluna on "Display form &#38; create post draft only if user have a custom capability"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/display-form-create-post-draft-only-if-user-have-a-custom-capability#post-162148</link>
			<pubDate>Wed, 06 Mar 2013 12:56:27 +0000</pubDate>
			<dc:creator>dashaluna</dc:creator>
			<guid isPermaLink="false">162148@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I've got a custom WP role that have got a custom capability &#60;code&#62;create_story&#60;/code&#62;. I know that in the advanced settings there is an option to display form only if a user logged in.&#60;/p&#62;
&#60;p&#62;How do I do the following:&#60;/p&#62;
&#60;p&#62;1. Display the form only if a user has got my custom capability?&#60;br /&#62;
2. After a form submitted, before creating a post draft how do I check if a user has got my custom capability?&#60;/p&#62;
&#60;p&#62;I'm sure these are possible, I would hugely appreciate if you could point me in the right directions with which hooks to use.&#60;/p&#62;
&#60;p&#62;Many thanks, Dasha&#60;/p&#62;
&#60;p&#62;WP: 3.5.1&#60;br /&#62;
Gravity Forms: 1.6.12
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
