Require login for Frontend submission?

Support MB Frontend Submission Require login for Frontend submission?Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39252
    KeithKeith
    Participant

    Is there a way to require login before submitting a form on the frontend?

    #39254
    KeithKeith
    Participant

    I found that the Members plugin allows me to wrap the metabox frontend shortcode in Members shortcode.

    https://members-plugin.com/

    I used one for logged in users and another for logged out users to display different content.

    [members_logged_in]
    [mb_frontend_form id='drop-details' post_fields='title,thumbnail,content']
    [/members_logged_in]
    
    [members_not_logged_in]<p>You must login to add a Drop. </p>
    [members_login_form /]
    [/members_not_logged_in]
    #39268
    PeterPeter
    Moderator

    Hello,

    Thanks for sharing your solution. Currently, there is no option to require a user login to view the frontend submission form. You can just output the shortcode in a condition to check the user login with WordPress function is_user_logged_in()
    https://developer.wordpress.org/reference/functions/is_user_logged_in/

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.