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.

Creating Post Author Based On Another Form

  1. Anonymous
    Unregistered

    I have two forms: One to register users in a contest. The second is to have them put in their entry. Each entry should be the author name they establish in the first form. When someone registers using the Registration Add-On, are they actually "in" WordPress as a user and can I use that to allow them to create new posts under their username they established in the first form?

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  2. The User Registration Add-On creates a user in your WordPress site. So yes, it adds them as a user. In order to use them as the author for their entry they would have to be logged into your site when they fill out the second form. There is an option on the Post Body and Post Title fields to use the logged in user as the author of the post that is created.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  3. Anonymous
    Unregistered

    OK, then my form has a problem. I have the box checked that says "Use logged in user as author (?)" but it's not registering them as the author. It's registering the default person as me.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  4. Anonymous
    Unregistered

    Or should I forward the user to the log-in screen so that they can then add their ebook? Or if I have the entry form include the username field and they use the same form again, will it be pre-populated with their username, email, etc.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  5. The user has to be logged into your site in order for that option to work. The User Registration Add-On doesn't log the user in, it only creates a new user. They then receive their login information via email and then they can login to your site. They have to login to your site in order for a form to use them as the author of the post. Gravity Forms doesn't log users in.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  6. Anonymous
    Unregistered

    Gotcha. So then I should direct them to log in after submitting their registration so that they can then add their posts? Sounds good.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  7. Yes, that is correct.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  8. Anonymous
    Unregistered

    So how do I send them to both the login page AND the page with the form?

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  9. Gravity Forms can only redirect the user to one location after the form is submitted. So if they need to login before filling out your other form, you need to send them to a login page. You may need to use another plugin such as a Membership type plugin to protect the page containing the post creation form that way they have to be logged in to access it. Gravity Forms alone may not do everything you are trying to do since it is fairly specific to your use case.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  10. Anonymous
    Unregistered

    Thanks.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  11. Anonymous
    Unregistered

    Is there any way that I can hide the form if they are not logged in?

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  12. Currently there isn't a feature in Gravity Forms that lets you do this. You'd have to use something like Justin Tadlock's Membership plugin to hide content from non-logged in users. But we do plan on adding this capability as a built in Gravity Forms feature in the 1.5.3 release.

    Posted 13 years ago on Wednesday June 15, 2011 | Permalink
  13. Anonymous
    Unregistered

    Suh-weet!!

    Posted 13 years ago on Thursday June 16, 2011 | Permalink

This topic has been resolved and has been closed to new replies.