Show a form based on login status

I have two forms to display. One is for members (logged in users), the other for everyone else. An example would be
[this is a member]
show form one
[/this is a member]
[this is not a member]
show form two
[/this is not a member]

If someone is logged in (meaning they are a member), then they would see form #1. If they were not logged in, then they would see form #2

  • Bob

    I looked at that shortcode, but the way that I read it, the choices that would apply to me are loggedin or guest. The guest option seems to require that the person be registered on the site as a guest, which we do not want to force. For my purposes, I only need to know if they are logged in or not logged in.

    I use with another membership system that works the way that I described. I can differentiate between someone who is a member or who is not a member. That has more refinement, because it handles three states:
    Logged in and a member
    Logged in and not a member (registered guest)
    not logged in

    I realize the benefit of having everyone registered in the system, but not all visitors want to do that so it becomes self-limiting.
    My suggestion would be to add an option to the list: loggedout
    - which would be equivalent to notLoggedIn.

  • Patrick

    Hi again Bob

    Actually, the "guest" parameter is for not-logged-in visitors. Try the following shortcodes on a test page on your site, and you'll see the behavior of each parameter:

    [ms-user type="guest"]This shows only to not-logged-in visitors[/ms-user]
    [ms-user]This shows only to logged-in users[/ms-user]
    [ms-user type="admin"]This shows only to logged-in admins[/ms-user]
    [ms-user type="non-admin"]This shows to everyone except logged-in admins[/ms-user]

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.