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.

Post as different user

  1. I'm using the form to allow users to post links to our site. In the "Post Body" field, there is an option to choose which author is used for the post, either default user or logged in user.
    What i want to do is default to the logged in user, but add an option to post as anonymous. We have an Anonymous user on the site already. I'd like to have a checkbox that when selected, would show the author as Anonymous rather than the logged in user. Any help? I'm new to Gravity Forms.

    Posted 11 years ago on Wednesday February 23, 2011 | Permalink
  2. It's not live yet, but the form is here...
    http://hammeroftruth.com/submit/

    Posted 11 years ago on Wednesday February 23, 2011 | Permalink
  3. This isn't possible as a built in feature. The only available options are to use the default author OR if the user logged in you can optionally use the username of the user that is logged in when they fill out the form. If this option is turned on and they aren't logged in it will fallback to the default user.

    So you could set the default user as Anonymous and if they want to post anonymously they just should do so without being logged into your WordPress site and it will use Anonymous.

    Posted 11 years ago on Wednesday February 23, 2011 | Permalink
  4. How about using logic hooks?
    I can identify pre_submission when the box is checked, but I don't see post body (it's a hidden field, then formatted based on title and url fields). Any ideas on how to update either pre or post submission? I feel like I'm getting closer, but I can't identify where to set the user.

    Posted 11 years ago on Wednesday February 23, 2011 | Permalink
  5. Try pasting the snippet below in your functions.php file. There are comments in the code for the two pieces you will need to update for your setup.

    http://pastie.org/1599741

    Posted 11 years ago on Wednesday February 23, 2011 | Permalink
  6. Dude... you rock :D
    That did exactly what I need.

    Posted 11 years ago on Wednesday February 23, 2011 | Permalink
  7. Glad to help. :)

    Posted 11 years ago on Wednesday February 23, 2011 | Permalink