PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Require Login

  1. I want to require that someone is logged in for the form to be accepted. Is there a way to do that without making it a "private" page in wordpress?

    http://www.scriptureinsong.com/submit/

    Posted 13 years ago on Saturday October 9, 2010 | Permalink
  2. There are no user permissions functions built in to Gravity Forms. You would have to use something like the WordPress conditional tag "is_user_logged_in" in your page template and embed the form via the function call. Something like this..

    <?php if ( is_user_logged_in() ) { ?>
    
     <?php gravity_form(1, false, false, false, '', false); ?>
    
    <?php } else { ?>
    
     <h2>Sorry. You have to be logged in to complete this form</h2>
    
    <?php };?>

    more info:

    http://codex.wordpress.org/Function_Reference/is_user_logged_in
    http://forum.gravityhelp.com/topic/how-do-i-send-dynamic-values-with-the-gravity_form-function#post-10887

    Or you might be able to use something like this.. it has the advantage of being applied easily anywhere

    http://www.livexp.net/wordpress/using-wordpress-shortcodes-to-show-members-only-content.html

    put the form in the member section and the alternate content in the visitor section.

    Posted 13 years ago on Saturday October 9, 2010 | Permalink